mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibWeb: Don't load anything for <iframe> without src attribute
Completing an empty URL string from the document base URL will just return the document URL, so any document that had an "<iframe>" would endlessly load itself in recursive iframes.
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 19:29:46 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/5e945c51699
@@ -66,6 +66,9 @@ void HTMLIFrameElement::load_src(const String& value)
|
||||
if (!m_content_frame)
|
||||
return;
|
||||
|
||||
if (value.is_null())
|
||||
return;
|
||||
|
||||
auto url = document().complete_url(value);
|
||||
if (!url.is_valid()) {
|
||||
dbgln("iframe failed to load URL: Invalid URL: {}", value);
|
||||
|
||||
Reference in New Issue
Block a user