Fix form-action CSP directive for external login (#20962)

lolsob-rspec
Claire 2022-11-17 22:59:07 +01:00 committed by GitHub
parent aa37dc6aae
commit 3b81318a0f
1 changed files with 4 additions and 0 deletions

View File

@ -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?