svn commit: r459226 - in head/www/waterfox: . files
Jan Beich
jbeich at FreeBSD.org
Wed Jan 17 08:59:14 UTC 2018
Author: jbeich
Date: Wed Jan 17 08:59:12 2018
New Revision: 459226
URL: https://svnweb.freebsd.org/changeset/ports/459226
Log:
www/waterfox: unbreak HTTP auth dialog after r458873
PR: 225231
Reported by: Graham Perrin
Added:
head/www/waterfox/files/patch-bug1425156 (contents, props changed)
Modified:
head/www/waterfox/Makefile (contents, props changed)
Modified: head/www/waterfox/Makefile
==============================================================================
--- head/www/waterfox/Makefile Wed Jan 17 08:39:20 2018 (r459225)
+++ head/www/waterfox/Makefile Wed Jan 17 08:59:12 2018 (r459226)
@@ -2,6 +2,7 @@
PORTNAME= waterfox
DISTVERSION= 56.0.3
+PORTREVISION= 1
CATEGORIES= www ipv6
MAINTAINER= jbeich at FreeBSD.org
Added: head/www/waterfox/files/patch-bug1425156
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/waterfox/files/patch-bug1425156 Wed Jan 17 08:59:12 2018 (r459226)
@@ -0,0 +1,78 @@
+commit 38b712aab29c
+Author: Dragana Damjanovic <dd.mozilla at gmail.com>
+Date: Thu Dec 14 20:22:56 2017 +0100
+
+ Bug 1425156 - Fix bug in the http-auth dialog blocking. r=ckerschb a=gchang
+
+ --HG--
+ extra : source : e098500c325d3aaddc9cc4166b8695f294b6a246
+---
+ .../protocol/http/nsHttpChannelAuthProvider.cpp | 28 ++++++++++++----------
+ 1 file changed, 16 insertions(+), 12 deletions(-)
+
+diff --git netwerk/protocol/http/nsHttpChannelAuthProvider.cpp netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
+index c70eb9455adb..d8d604d234ab 100644
+--- netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
++++ netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
+@@ -993,16 +993,19 @@ nsHttpChannelAuthProvider::BlockPrompt()
+ bool nonWebContent = false;
+
+ if (loadInfo) {
+- nsCOMPtr<nsIPrincipal> triggeringPrinc =
+- loadInfo->TriggeringPrincipal();
+- if (nsContentUtils::IsSystemPrincipal(triggeringPrinc)) {
+- nonWebContent = true;
+- }
+-
+ if (loadInfo->GetExternalContentPolicyType() !=
+ nsIContentPolicy::TYPE_DOCUMENT) {
+ topDoc = false;
+ }
++
++ if (!topDoc) {
++ nsCOMPtr<nsIPrincipal> triggeringPrinc =
++ loadInfo->TriggeringPrincipal();
++ if (nsContentUtils::IsSystemPrincipal(triggeringPrinc)) {
++ nonWebContent = true;
++ }
++ }
++
+ if (loadInfo->GetExternalContentPolicyType() ==
+ nsIContentPolicy::TYPE_XMLHTTPREQUEST) {
+ xhr = true;
+@@ -1027,12 +1030,12 @@ nsHttpChannelAuthProvider::BlockPrompt()
+ }
+
+ if (gHttpHandler->IsTelemetryEnabled()) {
+- if (nonWebContent) {
+- Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS_3,
+- HTTP_AUTH_DIALOG_NON_WEB_CONTENT);
+- } else if (topDoc) {
++ if (topDoc) {
+ Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS_3,
+ HTTP_AUTH_DIALOG_TOP_LEVEL_DOC);
++ } else if (nonWebContent) {
++ Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS_3,
++ HTTP_AUTH_DIALOG_NON_WEB_CONTENT);
+ } else if (!mCrossOrigin) {
+ if (xhr) {
+ Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS_3,
+@@ -1047,7 +1050,7 @@ nsHttpChannelAuthProvider::BlockPrompt()
+ }
+ }
+
+- if (!sNonWebContentTriggeredAuthAllow && nonWebContent) {
++ if (!topDoc && !sNonWebContentTriggeredAuthAllow && nonWebContent) {
+ return true;
+ }
+
+@@ -1065,7 +1068,8 @@ nsHttpChannelAuthProvider::BlockPrompt()
+ // If pref network.auth.subresource-img-cross-origin-http-auth-allow
+ // is set, http-authentication dialog for image subresources is
+ // blocked.
+- if (!sImgCrossOriginAuthAllowPref &&
++ if (mCrossOrigin &&
++ !sImgCrossOriginAuthAllowPref &&
+ loadInfo &&
+ ((loadInfo->GetExternalContentPolicyType() == nsIContentPolicy::TYPE_IMAGE) ||
+ (loadInfo->GetExternalContentPolicyType() == nsIContentPolicy::TYPE_IMAGESET))) {
More information about the svn-ports-all
mailing list