1
0
Fork 1
forked from fedi/mastodon

Fix PermalinkRedirector not applying to users with moved accounts (#22497)

Fixes #22262
This commit is contained in:
Claire 2023-01-05 13:40:27 +01:00 committed by talon
parent f3da0113a2
commit c18d79cd3b

View file

@ -4,7 +4,7 @@ module WebAppControllerConcern
extend ActiveSupport::Concern
included do
before_action :redirect_unauthenticated_to_permalinks!
prepend_before_action :redirect_unauthenticated_to_permalinks!
before_action :set_app_body_class
before_action :set_referrer_policy_header
end
@ -18,7 +18,7 @@ module WebAppControllerConcern
end
def redirect_unauthenticated_to_permalinks!
return if user_signed_in?
return if user_signed_in? && current_account.moved_to_account_id.nil?
redirect_path = PermalinkRedirector.new(request.path).redirect_path