Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-07-26 12:25:10 +0300
committerDouwe Maan <douwe@selenight.nl>2017-07-26 12:25:10 +0300
commitdcf4a2e83c69d1be0915f9c4c4f023abee2e7dea (patch)
tree540001cadb67cebea9afacbc9c61f3dd8911e835 /lib/gitlab/request_forgery_protection.rb
parent5a1f3df3b82361b613dbf718c4f7af26332297a1 (diff)
Rescue only from ActionController::InvalidAuthenticityToken
Diffstat (limited to 'lib/gitlab/request_forgery_protection.rb')
-rw-r--r--lib/gitlab/request_forgery_protection.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/request_forgery_protection.rb b/lib/gitlab/request_forgery_protection.rb
index b0e15e2b655..48dd0487790 100644
--- a/lib/gitlab/request_forgery_protection.rb
+++ b/lib/gitlab/request_forgery_protection.rb
@@ -19,5 +19,13 @@ module Gitlab
def self.call(env)
app.call(env)
end
+
+ def self.verified?(env)
+ call(env)
+
+ true
+ rescue ActionController::InvalidAuthenticityToken
+ false
+ end
end
end