Skip to content
Snippets Groups Projects
Commit 9d3b435e authored by Mayra Cabrera's avatar Mayra Cabrera
Browse files

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

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

See merge request https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/4454



Merged-by: default avatarMayra Cabrera <mcabrera@gitlab.com>
Approved-by: default avatarMayra Cabrera <mcabrera@gitlab.com>
Co-authored-by: default avatarJohn T Skarbek <jtslear@gmail.com>
parents c0c9b8c5 f81601eb
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