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

Merge branch 'revert-3863794e' into '17-1-stable-ee'

Revert 'security-psk-fix-external-wiki-integration-dos-17-1' into '17-1"

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



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 5357cee6 ade7fc8b
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