]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/oauth_controller.rb
Merge branch 'master' into moderation
[rails.git] / app / controllers / oauth_controller.rb
index 4bb129ba442c16bf4df6cd1758a866f4f04dcdc6..84bbcf1850e5c95cf6d6d925c0c009b3f7e83315 100644 (file)
@@ -38,6 +38,8 @@ class OauthController < ApplicationController
   protected
 
   def oauth1_authorize
+    append_content_security_policy_directives(:form_action => %w[*])
+
     if @token.invalidated?
       @message = t "oauth.oauthorize_failure.invalid"
       render :action => "authorize_failure"
@@ -61,9 +63,7 @@ class OauthController < ApplicationController
                                     "&oauth_token=#{@token.token}"
                                 end
 
-          unless @token.oauth10?
-            @redirect_url.query += "&oauth_verifier=#{@token.verifier}"
-          end
+          @redirect_url.query += "&oauth_verifier=#{@token.verifier}" unless @token.oauth10?
 
           redirect_to @redirect_url.to_s
         end