SECURITY: Don't allow base_uri as embeddable host if none exist

This commit is contained in:
Robin Ward
2019-09-29 20:51:59 -04:00
parent 756104432e
commit d5c5ca46b6
2 changed files with 5 additions and 1 deletions

View File

@ -65,6 +65,10 @@ describe EmbeddableHost do
end
end
it "doesn't allow forum own URL if no hosts exist" do
expect(EmbeddableHost.url_allowed?(Discourse.base_url)).to eq(false)
end
describe "url_allowed?" do
fab!(:host) { Fabricate(:embeddable_host) }