gecko-dev/netwerk
Andrew Sutherland 4d5d691957 Bug 1274250 - Referrer host should be IDN encoded when trimmed by policy. r=valentin
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.
2016-07-13 11:08:53 -04:00
..
base Bug 1275746 - Don't allow empty host name for URLTYPE_AUTHORITY URLs r=mcmanus 2016-07-13 15:19:33 +03:00
build Bug 1282866 - remove widget/qt and other supporting QT code, r=dougt. This patch does not remove all of the checks for MOZ_WIDGET_QT (which are dead code), but that will be a followup mentored bug. 2016-07-07 12:14:25 -04:00
cache Bug 1281793 - Remove some non-used telemetry IDs - part 2 - network/cache, r=gfritzsche 2016-06-28 19:29:28 +02:00
cache2 Bug 1279246 - Hang due to CacheFileInputStream deadlock, r=honzab 2016-07-12 17:58:38 +02:00
cookie Bug 1283368 - Implement cookie prefixes spec, r=valentin r=amchung 2016-06-29 22:42:36 -07:00
dns Bug 1274605 dont update dns generations on validated renewals r=dragana 2016-07-07 21:04:36 -04:00
ipc Bug 1256595 - Add frameOuterWindowID in nsILoadInfo, r=billm 2016-06-27 02:42:00 +02:00
locales Bug 1267910 - Part 1: Make the API getCookiesFromHost of the nsICookieManager2 OriginAttributes-aware. r=jdm 2016-05-25 11:54:21 +08:00
mime Bug 579388 - Only allow nsIMIMEService scripting from chrome. r=jaas+18821 2016-06-15 12:33:47 +01:00
protocol Bug 1274250 - Referrer host should be IDN encoded when trimmed by policy. r=valentin 2016-07-13 11:08:53 -04:00
sctp Bug 1278320 - DataChannel should return 0 if the stream is not active, r=drno 2016-06-29 08:03:37 +02:00
socket Bug 1250568 - Adding TLS 1.3 to nsISSLStatus, r=keeler 2016-04-04 16:21:19 -03:00
srtp Bug 1255655 - Const-ify and shrink octet_weight. r=hurley. 2016-03-11 13:43:29 +11:00
standalone Bug 1274376 - more mozilla::net namespaces r=dragana 2016-05-18 22:02:57 -04:00
streamconv Bug 1275744 - Reference MOZ_LOG in netwerk comments. r=erahm 2016-05-25 16:13:54 -07:00
system Bug 1282866 - remove widget/qt and other supporting QT code, r=dougt. This patch does not remove all of the checks for MOZ_WIDGET_QT (which are dead code), but that will be a followup mentored bug. 2016-07-07 12:14:25 -04:00
test Bug 1274250 - Referrer host should be IDN encoded when trimmed by policy. r=valentin 2016-07-13 11:08:53 -04:00
wifi Bug 1272513 - Part 1: Suppress -Wshadow warnings-as-errors in some directories. r=glandium 2016-05-11 00:00:01 -07:00
moz.build Bug 1252094 - Export necko-config.h from moz.build; r=ted 2016-03-01 09:17:29 +01:00
necko-config.h.in