mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 08:48:53 +00:00
Merge commit '127503eb2cdd67126974bee304dde0f183300b84' into glitch-soc/merge-upstream
Conflicts: - `app/helpers/accounts_helper.rb`: Conflict due to glitch-soc's option to hide followers count. Ported upstream changes. Additional changes: - `app/views/application/mailer/_account.html.haml`: Ported glitch-soc's option to hide followers count. - `app/views/settings/flavours/show.html.haml`: Ported the `frontend_asset_url` helper change to glitch-soc.
This commit is contained in:
@@ -52,9 +52,9 @@ Rails.application.config.content_security_policy do |p|
|
||||
|
||||
if Rails.env.development?
|
||||
webpacker_public_host = ENV.fetch('WEBPACKER_DEV_SERVER_PUBLIC', Webpacker.config.dev_server[:public])
|
||||
webpacker_urls = %w(ws http).map { |protocol| "#{protocol}#{Webpacker.dev_server.https? ? 's' : ''}://#{webpacker_public_host}" }
|
||||
front_end_build_urls = %w(ws http).map { |protocol| "#{protocol}#{Webpacker.dev_server.https? ? 's' : ''}://#{webpacker_public_host}" }
|
||||
|
||||
p.connect_src :self, :data, :blob, *media_hosts, Rails.configuration.x.streaming_api_base_url, *webpacker_urls
|
||||
p.connect_src :self, :data, :blob, *media_hosts, Rails.configuration.x.streaming_api_base_url, *front_end_build_urls
|
||||
p.script_src :self, :unsafe_inline, :unsafe_eval, assets_host
|
||||
else
|
||||
p.connect_src :self, :data, :blob, *media_hosts, Rails.configuration.x.streaming_api_base_url
|
||||
|
||||
@@ -2,15 +2,6 @@
|
||||
|
||||
require 'devise/strategies/authenticatable'
|
||||
|
||||
# TODO: Remove this patch when this PR or similar is merged into Devise:
|
||||
# https://github.com/heartcombo/devise/pull/5645
|
||||
# We rely on ENV vars and not secrets/credentials, so the deprecation is just noise.
|
||||
class Devise::SecretKeyFinder
|
||||
def find
|
||||
@application.secret_key_base
|
||||
end
|
||||
end
|
||||
|
||||
Warden::Manager.after_set_user except: :fetch do |user, warden|
|
||||
session_id = warden.cookies.signed['_session_id'] || warden.raw_session['auth_id']
|
||||
session_id = user.activate_session(warden.request) unless user.session_activations.active?(session_id)
|
||||
@@ -133,9 +124,11 @@ Devise.setup do |config|
|
||||
# The secret key used by Devise. Devise uses this key to generate
|
||||
# random tokens. Changing this key will render invalid all existing
|
||||
# confirmation, reset password and unlock tokens in the database.
|
||||
# Devise will use the `secret_key_base` on Rails 4+ applications as its `secret_key`
|
||||
# by default. You can change it below and use your own secret key.
|
||||
# config.secret_key = '2f86974c4dd7735170fd70fbf399f7a477ffd635ef240d07a22cf4bd7cd13dbae17c4383a2996d0c1e79a991ec18a91a17424c53e4771adb75a8b21904bd1403'
|
||||
#
|
||||
# Set explicitly to Rails default to avoid deprecation warnings.
|
||||
# https://github.com/heartcombo/devise/pull/5645#issuecomment-1871849856
|
||||
# Remove when Devise changes `SecretKeyFinder` to not emit deprecations.
|
||||
config.secret_key = Rails.application.secret_key_base
|
||||
|
||||
# ==> Mailer Configuration
|
||||
# Configure the e-mail address which will be shown in Devise::Mailer,
|
||||
|
||||
Reference in New Issue
Block a user