diff options
author | Martin Stransky <stransky@redhat.com> | 2016-09-08 13:37:25 +0200 |
---|---|---|
committer | Martin Stransky <stransky@redhat.com> | 2016-09-08 13:37:25 +0200 |
commit | 358c2b48a3d9838d8e3252039586a0ca1abdcb01 (patch) | |
tree | d2d7f6bc6a233d417e0f5fb4bd291e3aaaa35196 /mozilla-1291700.patch | |
parent | Added translations for .desktop file actions (diff) | |
download | librewolf-fedora-ff-358c2b48a3d9838d8e3252039586a0ca1abdcb01.tar.gz librewolf-fedora-ff-358c2b48a3d9838d8e3252039586a0ca1abdcb01.tar.bz2 librewolf-fedora-ff-358c2b48a3d9838d8e3252039586a0ca1abdcb01.zip |
Update to 49.0
Diffstat (limited to 'mozilla-1291700.patch')
-rw-r--r-- | mozilla-1291700.patch | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/mozilla-1291700.patch b/mozilla-1291700.patch deleted file mode 100644 index 0b0b3ba..0000000 --- a/mozilla-1291700.patch +++ /dev/null @@ -1,93 +0,0 @@ -# HG changeset patch -# User Honza Bambas <honzab.moz@firemni.cz> -# Parent 069612b7e7c93f79394fc40bc24c1e354de7a3e5 -Bug 1291700 - Allow negotiate/ntml to work when in the 'Never remember history' mode, r=jduell - -diff --git a/extensions/auth/nsHttpNegotiateAuth.cpp b/extensions/auth/nsHttpNegotiateAuth.cpp ---- a/extensions/auth/nsHttpNegotiateAuth.cpp -+++ b/extensions/auth/nsHttpNegotiateAuth.cpp -@@ -60,17 +60,37 @@ static const char kNegotiateAuthSSPI[] = - //----------------------------------------------------------------------------- - - // Return false when the channel comes from a Private browsing window. - static bool - TestNotInPBMode(nsIHttpAuthenticableChannel *authChannel) - { - nsCOMPtr<nsIChannel> bareChannel = do_QueryInterface(authChannel); - MOZ_ASSERT(bareChannel); -- return !NS_UsePrivateBrowsing(bareChannel); -+ -+ if (!NS_UsePrivateBrowsing(bareChannel)) { -+ return true; -+ } -+ -+ nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID); -+ if (!prefs) { -+ return true; -+ } -+ -+ // When the "Never remember history" option is set, all channels are -+ // set PB mode flag, but here we want to make an exception, users -+ // want their credentials go out. -+ bool dontRememberHistory; -+ if (NS_SUCCEEDED(prefs->GetBoolPref("browser.privatebrowsing.autostart", -+ &dontRememberHistory)) && -+ dontRememberHistory) { -+ return true; -+ } -+ -+ return false; - } - - NS_IMETHODIMP - nsHttpNegotiateAuth::GetAuthFlags(uint32_t *flags) - { - // - // Negotiate Auth creds should not be reused across multiple requests. - // Only perform the negotiation when it is explicitly requested by the -diff --git a/netwerk/protocol/http/nsHttpNTLMAuth.cpp b/netwerk/protocol/http/nsHttpNTLMAuth.cpp ---- a/netwerk/protocol/http/nsHttpNTLMAuth.cpp -+++ b/netwerk/protocol/http/nsHttpNTLMAuth.cpp -@@ -182,28 +182,38 @@ ForceGenericNTLM() - return flag; - } - - // Check to see if we should use default credentials for this host or proxy. - static bool - CanUseDefaultCredentials(nsIHttpAuthenticableChannel *channel, - bool isProxyAuth) - { -+ nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID); -+ - // Prevent using default credentials for authentication when we are in the - // private browsing mode. It would cause a privacy data leak. - nsCOMPtr<nsIChannel> bareChannel = do_QueryInterface(channel); - MOZ_ASSERT(bareChannel); -+ - if (NS_UsePrivateBrowsing(bareChannel)) { -+ // But allow when in the "Never remember history" mode. -+ bool dontRememberHistory; -+ if (prefs && -+ NS_SUCCEEDED(prefs->GetBoolPref("browser.privatebrowsing.autostart", -+ &dontRememberHistory)) && -+ !dontRememberHistory) { -+ return false; -+ } -+ } -+ -+ if (!prefs) { - return false; - } - -- nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID); -- if (!prefs) -- return false; -- - if (isProxyAuth) { - bool val; - if (NS_FAILED(prefs->GetBoolPref(kAllowProxies, &val))) - val = false; - LOG(("Default credentials allowed for proxy: %d\n", val)); - return val; - } - |