Skip to content
Snippets Groups Projects
Commit f81601eb authored by Ameya Darshan's avatar Ameya Darshan Committed by Mayra Cabrera
Browse files

Revert "Merge branch 'security-psk-fix-external-wiki-integration-dos-17-2' into '17-2-stable-ee'"

Merge branch 'revert-7bad7451' into '17-2-stable-ee'

See merge request gitlab-org/security/gitlab!4454

Changelog: security
parent c0c9b8c5
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -41,9 +41,8 @@ def sections
end
 
def execute(_data)
response = Gitlab::HTTP.head(properties['external_wiki_url'], verify: true)
true if response.code == 200
response = Gitlab::HTTP.get(properties['external_wiki_url'], verify: true)
response.body if response.code == 200
rescue StandardError
nil
end
Loading
Loading
Loading
Loading
@@ -34,7 +34,7 @@
 
context 'the URL is not reachable' do
before do
WebMock.stub_request(:head, url).to_return(status: 404)
WebMock.stub_request(:get, url).to_return(status: 404, body: 'not a page')
end
 
it 'is not successful' do
Loading
Loading
@@ -44,7 +44,7 @@
 
context 'the URL is reachable' do
before do
WebMock.stub_request(:head, url).to_return(status: 200)
WebMock.stub_request(:get, url).to_return(status: 200, body: 'foo')
end
 
it 'is successful' do
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