BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
f402762d
Commit
f402762d
authored
Jan 15, 2018
by
Douwe Maan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fj-41598-fixing-request-mime-type' into 'master'
Fixing request json mime type Closes #41598 See merge request gitlab-org/gitlab-ce!16427
parents
b3d85110
4f6e0379
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
+16
-3
fj-41598-fixing-request-mime-type.yml
changelogs/unreleased/fj-41598-fixing-request-mime-type.yml
+5
-0
user_auth_finders.rb
lib/gitlab/auth/user_auth_finders.rb
+1
-3
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 @
f402762d
---
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 @
f402762d
...
...
@@ -96,9 +96,7 @@ module Gitlab
end
def
ensure_action_dispatch_request
(
request
)
return
request
if
request
.
is_a?
(
ActionDispatch
::
Request
)
ActionDispatch
::
Request
.
new
(
request
.
env
)
ActionDispatch
::
Request
.
new
(
request
.
env
.
dup
)
end
def
current_request
...
...
spec/lib/gitlab/auth/user_auth_finders_spec.rb
View file @
f402762d
...
...
@@ -76,6 +76,16 @@ describe Gitlab::Auth::UserAuthFinders do
expect
(
find_user_from_rss_token
).
to
be_nil
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
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