зеркало из https://github.com/mozilla/gecko-dev.git
4d5d691957
Since bug 822869 the referrer trimming has relied on using prePath when trimming resulting in non-ASCII hosts being passed through in UTF-8 (or whatever their encoding was.) Prior to this patch, the logic when trimming was to generate the referrer string using prePath and possibly nsIURL.filePath, then re-derive the nsIURI from that string. Concerned about the cost of introducing asciiPrePath just for this consumer, I opted to have the code just combine the scheme and asciiHostPort to approximate the prior use of prePath. (userPass is explicitly cleared by the code.) Concerned about weirdness/loss of fidelity in the nsIURI, I replaced the code that re-derived the URI from the spec string with manual clearing of the parts of the URI/URL we were not including. This may not be the right thing to do. I modified the existing Gecko-specific test coverage of SetReferrerPolicy. The existing web platform tests and referrer policy didn't seem concerned with this case, and the bug is indeed localized to a very small segment of Gecko code. Note that the userReferrerTrimmingPolicy=1 bug case can only be triggered by explicit user preference setting and this is only tested in test_referrer.js. userReferrerTrimmingPolicy=2 need not be set by preference if REFERRER_POLICY_ORIGIN or REFERRER_POLICY_ORIGIN_WHEN_XORIGIN (when cross origin) is used. |
||
---|---|---|
.. | ||
base | ||
build | ||
cache | ||
cache2 | ||
cookie | ||
dns | ||
ipc | ||
locales | ||
mime | ||
protocol | ||
sctp | ||
socket | ||
srtp | ||
standalone | ||
streamconv | ||
system | ||
test | ||
wifi | ||
moz.build | ||
necko-config.h.in |