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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
29521a31
Commit
29521a31
authored
Nov 10, 2017
by
Francisco Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change the rss url guard clause
parent
f1896575
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
lib/gitlab/auth/user_auth_finders.rb
lib/gitlab/auth/user_auth_finders.rb
+1
-1
spec/requests/rack_attack_global_spec.rb
spec/requests/rack_attack_global_spec.rb
+3
-5
No files found.
lib/gitlab/auth/user_auth_finders.rb
View file @
29521a31
...
...
@@ -10,7 +10,7 @@ module Gitlab
end
def
find_user_from_rss_token
return
unless
current_request
.
format
.
atom?
return
unless
current_request
.
path
.
ends_with?
(
'.atom'
)
token
=
current_request
.
params
[
:rss_token
].
presence
return
unless
token
...
...
spec/requests/rack_attack_global_spec.rb
View file @
29521a31
...
...
@@ -241,12 +241,10 @@ describe 'Rack Attack global throttles' do
let
(
:throttle_setting_prefix
)
{
'throttle_authenticated_web'
}
context
'with the token in the query string'
do
context
'with the atom format in the Accept header'
do
let
(
:get_args
)
{
[
rss_url
(
user
),
nil
,
{
'HTTP_ACCEPT'
=>
'application/atom+xml'
}]
}
let
(
:other_user_get_args
)
{
[
rss_url
(
other_user
),
nil
,
{
'HTTP_ACCEPT'
=>
'application/atom+xml'
}]
}
let
(
:get_args
)
{
[
rss_url
(
user
),
nil
]
}
let
(
:other_user_get_args
)
{
[
rss_url
(
other_user
),
nil
]
}
it_behaves_like
'rate-limited token-authenticated requests'
end
it_behaves_like
'rate-limited token-authenticated requests'
end
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