Skip to content

Commit

Permalink
Fix form-action CSP directive for external login (mastodon#20962)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Nov 17, 2022
1 parent 4ae97a2 commit 48e1366
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/auth/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class Auth::SessionsController < Devise::SessionsController
before_action :set_instance_presenter, only: [:new]
before_action :set_body_classes

content_security_policy only: :new do |p|
p.form_action(false)
end

def check_suspicious!
user = find_user
@login_is_suspicious = suspicious_sign_in?(user) unless user.nil?
Expand Down

0 comments on commit 48e1366

Please sign in to comment.