Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d020eabf
Commit
d020eabf
authored
Jul 28, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add log messages to clarify log messages about API CSRF token verification failure
parent
4d05e853
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
lib/gitlab/request_forgery_protection.rb
lib/gitlab/request_forgery_protection.rb
+8
-0
No files found.
lib/gitlab/request_forgery_protection.rb
View file @
d020eabf
...
...
@@ -7,6 +7,14 @@ module Gitlab
class
Controller
<
ActionController
::
Base
protect_from_forgery
with: :exception
rescue_from
ActionController
::
InvalidAuthenticityToken
do
|
e
|
logger
.
warn
"This CSRF token verification failure is handled internally by `GitLab::RequestForgeryProtection`"
logger
.
warn
"Unlike the logs may suggest, this does not result in an actual 422 response to the user"
logger
.
warn
"For API requests, the only effect is that `current_user` will be `nil` for the duration of the request"
raise
e
end
def
index
head
:ok
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment