mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
SECURITY: Expand and improve SSRF Protections (#18815)
See https://github.com/discourse/discourse/security/advisories/GHSA-rcc5-28r3-23rr Co-authored-by: OsamaSayegh <asooomaasoooma90@gmail.com> Co-authored-by: Daniel Waterworth <me@danielwaterworth.com>
This commit is contained in:
15
spec/lib/git_url_spec.rb
Normal file
15
spec/lib/git_url_spec.rb
Normal file
@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
RSpec.describe GitUrl do
|
||||
it "handles the discourse github repo by ssh" do
|
||||
expect(GitUrl.normalize("git@github.com:discourse/discourse.git")).to eq(
|
||||
"ssh://git@github.com/discourse/discourse.git"
|
||||
)
|
||||
end
|
||||
|
||||
it "handles the discourse github repo by https" do
|
||||
expect(GitUrl.normalize("https://github.com/discourse/discourse.git")).to eq(
|
||||
"https://github.com/discourse/discourse.git"
|
||||
)
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user