Skip to content

Commit

Permalink
fix #24367
Browse files Browse the repository at this point in the history
  • Loading branch information
shnmorimoto committed Nov 5, 2019
1 parent 4886788 commit b0a12f6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion components/net/http_loader.rs
Expand Up @@ -1462,7 +1462,15 @@ fn http_network_fetch(
_ => false,
});

if !req_origin_in_timing_allow && !wildcard_present {
let is_same_origin = request.url_list.iter().any(|url| match request.origin {
SpecificOrigin(ref immutable_request_origin) => {
url.clone().into_url().origin().ascii_serialization() ==
immutable_request_origin.ascii_serialization()
},
_ => false,
});

if !(is_same_origin || req_origin_in_timing_allow || wildcard_present) {
context.timing.lock().unwrap().mark_timing_check_failed();
}

Expand Down

0 comments on commit b0a12f6

Please sign in to comment.