Chromium Code Reviews
DescriptionFix a null-deref in Upgrade-Insecure-Request's handling of unique origins.
If a page is sandboxed into a unique origin, the current code which enforces
upgrading insecure requests will end up doing dereferencing the origin's
host. Unfortunately the origin has no host, and we end up doing a null-deref
on the StringImpl. Whoops.
This patch aligns our behavior with the spec's mandate to use the protected
resource's URL's host instead:
https://www.w3.org/TR/upgrade-insecure-requests/#delivery. It also changes
the 'isNull' check to an 'isEmpty' check to handle URLs without hosts, like
'data:'.
BUG=643084
Committed: https://crrev.com/33153e2598026b19f247a2c6ee2362124b5aea4e
Cr-Commit-Position: refs/heads/master@{#415921}
Patch Set 1 #Patch Set 2 : Drop variable. #Patch Set 3 : Test #
Messages
Total messages: 16 (11 generated)
|
|||||||||||||||||||||||||||||||||||||