SECURITY: Remove bypass for base_url (#19995)

The check used to be necessary because we validated the referrer too and
this bypass was a workaround a bug that is present in some browsers that
do not send the correct referrer.
This commit is contained in:
Bianca Nenciu
2023-01-25 13:50:45 +02:00
committed by GitHub
parent d5745d34c2
commit cd7c8861ae
2 changed files with 2 additions and 5 deletions

View File

@ -88,8 +88,8 @@ RSpec.describe EmbeddableHost do
expect(EmbeddableHost.url_allowed?("http://discourse.org")).to eq(true)
end
it "always allow forum own URL" do
expect(EmbeddableHost.url_allowed?(Discourse.base_url)).to eq(true)
it "does not allow forum own URL" do
expect(EmbeddableHost.url_allowed?(Discourse.base_url)).to eq(false)
end
end