Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jan 2018 08:59:58 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r459227 - in branches/2018Q1/www/waterfox: . files
Message-ID:  <201801170859.w0H8xw7H068796@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Wed Jan 17 08:59:58 2018
New Revision: 459227
URL: https://svnweb.freebsd.org/changeset/ports/459227

Log:
  MFH: r459226
  
  www/waterfox: unbreak HTTP auth dialog after r458873
  
  PR:		225231
  Reported by:	Graham Perrin
  Approved by:	ports-secteam blanket

Added:
  branches/2018Q1/www/waterfox/files/patch-bug1425156
     - copied unchanged from r459226, head/www/waterfox/files/patch-bug1425156
Modified:
  branches/2018Q1/www/waterfox/Makefile
Directory Properties:
  branches/2018Q1/   (props changed)

Modified: branches/2018Q1/www/waterfox/Makefile
==============================================================================
--- branches/2018Q1/www/waterfox/Makefile	Wed Jan 17 08:59:12 2018	(r459226)
+++ branches/2018Q1/www/waterfox/Makefile	Wed Jan 17 08:59:58 2018	(r459227)
@@ -2,6 +2,7 @@
 
 PORTNAME=	waterfox
 DISTVERSION=	56.0.3
+PORTREVISION=	1
 CATEGORIES=	www ipv6
 
 MAINTAINER=	jbeich@FreeBSD.org

Copied: branches/2018Q1/www/waterfox/files/patch-bug1425156 (from r459226, head/www/waterfox/files/patch-bug1425156)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2018Q1/www/waterfox/files/patch-bug1425156	Wed Jan 17 08:59:58 2018	(r459227, copy of r459226, head/www/waterfox/files/patch-bug1425156)
@@ -0,0 +1,78 @@
+commit 38b712aab29c
+Author: Dragana Damjanovic <dd.mozilla@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))) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801170859.w0H8xw7H068796>