From owner-svn-ports-all@freebsd.org Wed Jan 17 08:59:14 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A791EB72AA; Wed, 17 Jan 2018 08:59:14 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 149109A8; Wed, 17 Jan 2018 08:59:14 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 30E405445; Wed, 17 Jan 2018 08:59:13 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0H8xCON068626; Wed, 17 Jan 2018 08:59:12 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0H8xC6u068624; Wed, 17 Jan 2018 08:59:12 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201801170859.w0H8xC6u068624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Wed, 17 Jan 2018 08:59:12 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r459226 - in head/www/waterfox: . files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: in head/www/waterfox: . files X-SVN-Commit-Revision: 459226 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2018 08:59:14 -0000 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@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 +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 triggeringPrinc = +- loadInfo->TriggeringPrincipal(); +- if (nsContentUtils::IsSystemPrincipal(triggeringPrinc)) { +- nonWebContent = true; +- } +- + if (loadInfo->GetExternalContentPolicyType() != + nsIContentPolicy::TYPE_DOCUMENT) { + topDoc = false; + } ++ ++ if (!topDoc) { ++ nsCOMPtr 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))) {