Skip to content
Snippets Groups Projects
Commit 5a292c1f authored by GitLab Release Tools Bot's avatar GitLab Release Tools Bot
Browse files

Merge branch 'security-github-media-cdn-ssrf' into 'master'

parents 9e1ec51d da3b71d7
No related branches found
No related tags found
1 merge request!158455Backport Release Environments notification pipeline change to 16.11
......@@ -10,7 +10,7 @@ class MarkdownText
# On github.com we have base url for docs and CDN url for media.
# On github EE as far as we can know there is no CDN urls and media is placed on base url.
GITHUB_MEDIA_CDN = 'https://user-images.githubusercontent.com'
GITHUB_MEDIA_CDN = 'https://user-images.githubusercontent.com/'
ISSUE_REF_MATCHER = '%{github_url}/%{import_source}/issues'
PULL_REF_MATCHER = '%{github_url}/%{import_source}/pull'
......
......@@ -71,6 +71,12 @@
it { expect(described_class.from_markdown(markdown_node)).to eq nil }
end
context 'with allowed domain as subdomain' do
let(:url) { "https://user-images.githubusercontent.com.attacker.controlled.domain/1/uuid-1.#{image_extension}" }
it { expect(described_class.from_markdown(markdown_node)).to eq nil }
end
context 'when URL is blank' do
let(:url) { nil }
......
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