mirror of
https://github.com/servo/servo
synced 2026-04-27 18:07:52 +02:00
script: Check same-origin-domain when evaluating javscript: URLs. (#41969)
These changes introduce a new OriginSnapshot type, which is an immutable version of MutableOrigin (ie. an origin that includes an optional domain modifier). This is now propagated as part of LoadData's origin, allowing us to perform the same-origin-domain check for javascript: URLs as needed. Testing: Newly-passing tests. Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
@@ -872,7 +872,7 @@ impl HTMLFormElement {
|
||||
// Step 21
|
||||
let target_window = target_document.window();
|
||||
let mut load_data = LoadData::new(
|
||||
LoadOrigin::Script(doc.origin().immutable().clone()),
|
||||
LoadOrigin::Script(doc.origin().snapshot()),
|
||||
action_components,
|
||||
None,
|
||||
target_window.as_global_scope().get_referrer(),
|
||||
|
||||
Reference in New Issue
Block a user