Merge branch 'main' into glitch-soc/merge-upstream

Conflicts:
- `README.md`:
  Upstream README has been changed, but we have a completely different one.
  Kept our `README.md`.
- `lib/sanitize_ext/sanitize_config.rb`:
  Upstream added support for more incoming HTML tags (a large subset of what
  glitch-soc accepts).
  Change the code style to match upstream's but otherwise do not change our
  code.
- `spec/lib/sanitize_config_spec.rb`:
  Upstream added support for more incoming HTML tags (a large subset of what
  glitch-soc accepts).
  Kept our version, since the tests are mostly glitch-soc's, except for cases
  which are purposefuly different.
This commit is contained in:
Claire
2023-03-05 20:43:48 +01:00
216 changed files with 3107 additions and 557 deletions

View File

@ -5,6 +5,7 @@ default: &default
connect_timeout: 15
encoding: unicode
sslmode: <%= ENV['DB_SSLMODE'] || "prefer" %>
application_name: ''
development:
<<: *default

View File

@ -87,6 +87,8 @@ Rails.application.configure do
config.x.otp_secret = ENV.fetch('OTP_SECRET', '1fc2b87989afa6351912abeebe31ffc5c476ead9bf8b3d74cbc4a302c7b69a45b40b1bbef3506ddad73e942e15ed5ca4b402bf9a66423626051104f4b5f05109')
end
Redis.raise_deprecations = true
ActiveRecordQueryTrace.enabled = ENV['QUERY_TRACE_ENABLED'] == 'true'
module PrivateAddressCheck

View File

@ -128,6 +128,7 @@ Rails.application.configure do
enable_starttls_auto: enable_starttls_auto,
tls: ENV['SMTP_TLS'].presence && ENV['SMTP_TLS'] == 'true',
ssl: ENV['SMTP_SSL'].presence && ENV['SMTP_SSL'] == 'true',
read_timeout: 20,
}
config.action_mailer.delivery_method = ENV.fetch('SMTP_DELIVERY_METHOD', 'smtp').to_sym

View File

@ -73,3 +73,5 @@ end
# Catch serialization warnings early
Sidekiq.strict_args!
Redis.raise_deprecations = true

View File

@ -90,6 +90,12 @@ if ENV['S3_ENABLED'] == 'true'
)
end
if ENV.has_key?('S3_STORAGE_CLASS')
Paperclip::Attachment.default_options[:s3_headers].merge!(
'X-Amz-Storage-Class' => ENV['S3_STORAGE_CLASS']
)
end
# Some S3-compatible providers might not actually be compatible with some APIs
# used by kt-paperclip, see https://github.com/mastodon/mastodon/issues/16822
if ENV['S3_FORCE_SINGLE_REQUEST'] == 'true'

View File

@ -0,0 +1 @@
Redis.sadd_returns_boolean = false

View File

@ -1408,6 +1408,7 @@ en:
confirm_remove_selected_followers: Are you sure you want to remove selected followers?
confirm_remove_selected_follows: Are you sure you want to remove selected follows?
dormant: Dormant
follow_failure: Could not follow some of the selected accounts.
follow_selected_followers: Follow selected followers
followers: Followers
following: Following
@ -1447,6 +1448,7 @@ en:
electron: Electron
firefox: Firefox
generic: Unknown browser
huawei_browser: Huawei Browser
ie: Internet Explorer
micro_messenger: MicroMessenger
nokia: Nokia S40 Ovi Browser
@ -1456,6 +1458,7 @@ en:
qq: QQ Browser
safari: Safari
uc_browser: UC Browser
unknown_browser: Unknown Browser
weibo: Weibo
current_session: Current session
description: "%{browser} on %{platform}"
@ -1468,9 +1471,10 @@ en:
chrome_os: ChromeOS
firefox_os: Firefox OS
ios: iOS
kai_os: KaiOS
linux: Linux
mac: macOS
other: unknown platform
unknown_platform: Unknown Platform
windows: Windows
windows_mobile: Windows Mobile
windows_phone: Windows Phone