From 5deba2782a57a8d84024c941bf0a31b7c0b64c49 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 23 May 2018 12:09:21 +0100 Subject: [PATCH] Completely remove form-action restrictions for OAuth callbacks The CSP3 draft only allows a * rule match network schemes and mobile devices often use callbacks to custom URL schemes. --- app/controllers/oauth_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/oauth_controller.rb b/app/controllers/oauth_controller.rb index ae6d0983b..801d88a18 100644 --- a/app/controllers/oauth_controller.rb +++ b/app/controllers/oauth_controller.rb @@ -38,7 +38,7 @@ class OauthController < ApplicationController protected def oauth1_authorize - append_content_security_policy_directives(:form_action => %w[*]) + override_content_security_policy_directives(:form_action => false) if @token.invalidated? @message = t "oauth.authorize_failure.invalid" -- 2.39.5