mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
LibWeb: <iframe src> same-origin check should be based on host document
We were basing the src attribute's cross-origin check on whatever was currently loaded in the iframe, instead of the surrounding document. Fixes #4236.
This commit is contained in:
@@ -79,8 +79,8 @@ void HTMLIFrameElement::load_src(const String& value)
|
|||||||
dbg() << "iframe failed to load URL: Invalid URL: " << value;
|
dbg() << "iframe failed to load URL: Invalid URL: " << value;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (url.protocol() == "file" && content_origin().protocol() != "file") {
|
if (url.protocol() == "file" && document().origin().protocol() != "file") {
|
||||||
dbg() << "iframe failed to load URL: Security violation: " << document().url() << " may not load " << value;
|
dbg() << "iframe failed to load URL: Security violation: " << document().url() << " may not load " << url;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user