Skip to content
Snippets Groups Projects
Commit 29521a31 authored by Francisco Javier López's avatar Francisco Javier López
Browse files

Change the rss url guard clause

parent f1896575
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment