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
4f6e0379
Commit
4f6e0379
authored
Jan 15, 2018
by
Francisco Javier López
Committed by
Douwe Maan
Jan 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing request json mime type
parent
b3d85110
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
+16
-3
changelogs/unreleased/fj-41598-fixing-request-mime-type.yml
changelogs/unreleased/fj-41598-fixing-request-mime-type.yml
+5
-0
lib/gitlab/auth/user_auth_finders.rb
lib/gitlab/auth/user_auth_finders.rb
+1
-3
spec/lib/gitlab/auth/user_auth_finders_spec.rb
spec/lib/gitlab/auth/user_auth_finders_spec.rb
+10
-0
No files found.
changelogs/unreleased/fj-41598-fixing-request-mime-type.yml
0 → 100644
View file @
4f6e0379
---
title
:
Fixing rack request mime type when using rack attack
merge_request
:
16427
author
:
type
:
fixed
lib/gitlab/auth/user_auth_finders.rb
View file @
4f6e0379
...
@@ -96,9 +96,7 @@ module Gitlab
...
@@ -96,9 +96,7 @@ module Gitlab
end
end
def
ensure_action_dispatch_request
(
request
)
def
ensure_action_dispatch_request
(
request
)
return
request
if
request
.
is_a?
(
ActionDispatch
::
Request
)
ActionDispatch
::
Request
.
new
(
request
.
env
.
dup
)
ActionDispatch
::
Request
.
new
(
request
.
env
)
end
end
def
current_request
def
current_request
...
...
spec/lib/gitlab/auth/user_auth_finders_spec.rb
View file @
4f6e0379
...
@@ -76,6 +76,16 @@ describe Gitlab::Auth::UserAuthFinders do
...
@@ -76,6 +76,16 @@ describe Gitlab::Auth::UserAuthFinders do
expect
(
find_user_from_rss_token
).
to
be_nil
expect
(
find_user_from_rss_token
).
to
be_nil
end
end
end
end
context
'when the request format is empty'
do
it
'the method call does not modify the original value'
do
env
[
'action_dispatch.request.formats'
]
=
nil
find_user_from_rss_token
expect
(
env
[
'action_dispatch.request.formats'
]).
to
be_nil
end
end
end
end
describe
'#find_user_from_access_token'
do
describe
'#find_user_from_access_token'
do
...
...
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