Loading netwerk/protocol/http/HttpBaseChannel.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ #include "nsMimeTypes.h" #include "nsNetCID.h" #include "nsNetUtil.h" #include "nsReadableUtils.h" #include "nsICachingChannel.h" #include "nsIDOMDocument.h" Loading Loading @@ -1391,13 +1392,15 @@ HttpBaseChannel::SetReferrerWithPolicy(nsIURI *referrer, return NS_OK; } // send spoofed referrer if desired if (userSpoofReferrerSource) { bool leavingOnion = !currentHost.Equals(referrerHost) && StringEndsWith(referrerHost, NS_LITERAL_CSTRING(".onion")); // send spoofed referrer if desired by user, or if we are leaving a .onion if (userSpoofReferrerSource || leavingOnion) { nsCOMPtr<nsIURI> mURIclone; rv = mURI->CloneIgnoringRef(getter_AddRefs(mURIclone)); if (NS_FAILED(rv)) return rv; clone = mURIclone; currentHost = referrerHost; } // strip away any userpass; we don't want to be giving out passwords ;-) Loading Loading
netwerk/protocol/http/HttpBaseChannel.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ #include "nsMimeTypes.h" #include "nsNetCID.h" #include "nsNetUtil.h" #include "nsReadableUtils.h" #include "nsICachingChannel.h" #include "nsIDOMDocument.h" Loading Loading @@ -1391,13 +1392,15 @@ HttpBaseChannel::SetReferrerWithPolicy(nsIURI *referrer, return NS_OK; } // send spoofed referrer if desired if (userSpoofReferrerSource) { bool leavingOnion = !currentHost.Equals(referrerHost) && StringEndsWith(referrerHost, NS_LITERAL_CSTRING(".onion")); // send spoofed referrer if desired by user, or if we are leaving a .onion if (userSpoofReferrerSource || leavingOnion) { nsCOMPtr<nsIURI> mURIclone; rv = mURI->CloneIgnoringRef(getter_AddRefs(mURIclone)); if (NS_FAILED(rv)) return rv; clone = mURIclone; currentHost = referrerHost; } // strip away any userpass; we don't want to be giving out passwords ;-) Loading