import changes from tenfourfox:

- #616: M1658214 M1637745 M1648372 (5ec6460ef)
- #616: update TLDs, HSTS (f25d7f7a7)
This commit is contained in:
2020-08-29 12:12:19 +08:00
parent dc9b9d596b
commit 60967aaddc
9 changed files with 2955 additions and 2962 deletions
+6
View File
@@ -5150,6 +5150,12 @@ nsContentUtils::TriggerLink(nsIContent *aContent,
fileName.SetIsVoid(true); // No actionable download attribute was found.
}
// Sanitize fileNames containing null characters by replacing them with
// underscores.
if (!fileName.IsVoid()) {
fileName.ReplaceChar(char16_t(0), '_');
}
nsDocShell::Cast(docShell)->OnLinkClick(aContent, aLinkURI,
fileName.IsVoid() ? aTargetSpec.get() : EmptyString().get(),
fileName, nullptr, nullptr, aIsTrusted, aContent->NodePrincipal());
+6 -1
View File
@@ -2532,6 +2532,12 @@ ConstructJSImplementation(const char* aContractId,
{
AutoNoJSAPI nojsapi;
nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(aGlobal);
if (!window->IsCurrentInnerWindow()) {
aRv.Throw(NS_ERROR_FAILURE);
return;
}
// Get the XPCOM component containing the JS implementation.
nsresult rv;
nsCOMPtr<nsISupports> implISupports = do_CreateInstance(aContractId, &rv);
@@ -2546,7 +2552,6 @@ ConstructJSImplementation(const char* aContractId,
// and our global is a window.
nsCOMPtr<nsIDOMGlobalPropertyInitializer> gpi =
do_QueryInterface(implISupports);
nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(aGlobal);
if (gpi) {
JS::Rooted<JS::Value> initReturn(RootingCx());
rv = gpi->Init(window, &initReturn);
+1
View File
@@ -414,6 +414,7 @@ NS_IMETHODIMP
nsTextInputSelectionImpl::SetCaretReadOnly(bool aReadOnly)
{
if (!mPresShellWeak) return NS_ERROR_NOT_INITIALIZED;
if (!mFrameSelection) return NS_ERROR_FAILURE;
nsresult result;
nsCOMPtr<nsIPresShell> shell = do_QueryReferent(mPresShellWeak, &result);
if (shell)
+6
View File
@@ -577,6 +577,12 @@ NS_IMETHODIMP
nsBaseChannel::SetContentDispositionFilename(const nsAString &aContentDispositionFilename)
{
mContentDispositionFilename = new nsString(aContentDispositionFilename);
// For safety reasons ensure the filename doesn't contain null characters and
// replace them with underscores. We may later pass the extension to system
// MIME APIs that expect null terminated strings.
mContentDispositionFilename->ReplaceChar(char16_t(0), '_');
return NS_OK;
}
+56 -10
View File
@@ -7103,7 +7103,7 @@ org.zw
// newGTLDs
// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2020-07-18T17:05:44Z
// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2020-08-07T17:16:50Z
// This list is auto-generated, don't edit it manually.
// aaa : 2015-02-26 American Automobile Association, Inc.
aaa
@@ -7318,7 +7318,7 @@ auspost
// author : 2014-12-18 Amazon Registry Services, Inc.
author
// auto : 2014-11-13 Cars Registry Limited
// auto : 2014-11-13 XYZ.COM LLC
auto
// autos : 2014-01-09 DERAutos, LLC
@@ -7594,7 +7594,7 @@ capital
// capitalone : 2015-08-06 Capital One Financial Corporation
capitalone
// car : 2015-01-22 Cars Registry Limited
// car : 2015-01-22 XYZ.COM LLC
car
// caravan : 2013-12-12 Caravan International, Inc.
@@ -7612,7 +7612,7 @@ career
// careers : 2013-10-02 Binky Moon, LLC
careers
// cars : 2014-11-13 Cars Registry Limited
// cars : 2014-11-13 XYZ.COM LLC
cars
// casa : 2013-11-21 Minds + Machines Group Limited
@@ -8797,7 +8797,7 @@ law
// lawyer : 2014-03-20 Dog Beach, LLC
lawyer
// lds : 2014-03-20 IRI Domain Management, LLC ("Applicant")
// lds : 2014-03-20 IRI Domain Management, LLC
lds
// lease : 2014-03-06 Binky Moon, LLC
@@ -9064,7 +9064,7 @@ money
// monster : 2015-09-11 XYZ.COM LLC
monster
// mormon : 2013-12-05 IRI Domain Management, LLC ("Applicant")
// mormon : 2013-12-05 IRI Domain Management, LLC
mormon
// mortgage : 2014-03-20 Dog Beach, LLC
@@ -9547,9 +9547,6 @@ richardli
// ricoh : 2014-11-20 Ricoh Company, Ltd.
ricoh
// rightathome : 2015-07-23 Johnson Shareholdings, Inc.
rightathome
// ril : 2015-04-02 Reliance Industries Limited
ril
@@ -10075,7 +10072,7 @@ travelers
// travelersinsurance : 2015-03-26 Travelers TLD, LLC
travelersinsurance
// trust : 2014-10-16 NCC Group Inc.
// trust : 2014-10-16 NCC Group Domain Services, Inc.
trust
// trv : 2015-03-26 Travelers TLD, LLC
@@ -10685,6 +10682,12 @@ barsy.ca
// Submitted by Werner Kaltofen <wk@all-inkl.com>
kasserver.com
// Algorithmia, Inc. : algorithmia.com
// Submitted by Eli Perelman <eperelman@algorithmia.io>
*.algorithmia.com
!teams.algorithmia.com
!test.algorithmia.com
// Altervista: https://www.altervista.org
// Submitted by Carlo Cannas <tech_staff@altervista.it>
altervista.org
@@ -11166,6 +11169,10 @@ debian.net
// Submitted by Peter Thomassen <peter@desec.io>
dedyn.io
// DNS Africa Ltd https://dns.business
// Submitted by Calvin Browne <calvin@dns.business>
jozi.biz
// DNShome : https://www.dnshome.de/
// Submitted by Norbert Auler <mail@dnshome.de>
dnshome.de
@@ -11860,6 +11867,10 @@ lolipop.io
cloudapps.digital
london.cloudapps.digital
// GOV.UK Pay : https://www.payments.service.gov.uk/
// Submitted by Richard Baker <richard.baker@digital.cabinet-office.gov.uk>
pymnt.uk
// UKHomeOffice : https://www.gov.uk/government/organisations/home-office
// Submitted by Jon Shanks <jon.shanks@digital.homeoffice.gov.uk>
homeoffice.gov.uk
@@ -12097,6 +12108,10 @@ to.leg.br
// Submitted by Wolfgang Schwarz <admin@intermetrics.de>
pixolino.com
// Internet-Pro, LLP: https://netangels.ru/
// Submited by Vasiliy Sheredeko <piphon@gmail.com>
na4u.ru
// IPiFony Systems, Inc. : https://www.ipifony.com/
// Submitted by Matthew Hardeman <mhardeman@ipifony.com>
ipifony.net
@@ -12287,6 +12302,11 @@ mayfirst.org
// Submitted by Ilya Zaretskiy <zaretskiy@corp.mail.ru>
hb.cldmail.ru
// McHost : https://mchost.ru
// Submitted by Evgeniy Subbotin <e.subbotin@mchost.ru>
mcdir.ru
vps.mcdir.ru
// Memset hosting : https://www.memset.com
// Submitted by Tom Whitwell <domains@memset.com>
miniserver.com
@@ -12335,6 +12355,19 @@ net.ru
org.ru
pp.ru
// Mythic Beasts : https://www.mythic-beasts.com
// Submitted by Paul Cammish <kelduum@mythic-beasts.com>
hostedpi.com
customer.mythic-beasts.com
lynx.mythic-beasts.com
ocelot.mythic-beasts.com
onza.mythic-beasts.com
sphinx.mythic-beasts.com
vs.mythic-beasts.com
x.mythic-beasts.com
yali.mythic-beasts.com
cust.retrosnub.co.uk
// Nabu Casa : https://www.nabucasa.com
// Submitted by Paulus Schoutsen <infra@nabucasa.com>
ui.nabu.casa
@@ -12636,6 +12669,13 @@ pagefrontapp.com
// Submitted by Yann Guichard <yann@pagexl.com>
pagexl.com
// pcarrier.ca Software Inc: https://pcarrier.ca/
// Submitted by Pierre Carrier <pc@rrier.ca>
bar0.net
bar1.net
bar2.net
rdv.to
// .pl domains (grandfathered)
art.pl
gliwice.pl
@@ -13008,6 +13048,8 @@ cust.dev.thingdust.io
cust.disrec.thingdust.io
cust.prod.thingdust.io
cust.testing.thingdust.io
*.firenet.ch
*.svc.firenet.ch
// Tlon.io : https://tlon.io
// Submitted by Mark Staarink <mark@tlon.io>
@@ -13275,4 +13317,8 @@ mintere.site
// Submitted by Michael Smith <michael.smith@wpengine.com>
wpenginepowered.com
// Impertrix Solutions : <https://impertrixcdn.com>
// Submitted by Zhixiang Zhao <csuite@impertrix.com>
impertrixcdn.com
impertrix.com
// ===END PRIVATE DOMAINS===
@@ -646,6 +646,12 @@ NS_IMETHODIMP
HttpBaseChannel::SetContentDispositionFilename(const nsAString& aContentDispositionFilename)
{
mContentDispositionFilename = new nsString(aContentDispositionFilename);
// For safety reasons ensure the filename doesn't contain null characters and
// replace them with underscores. We may later pass the extension to system
// MIME APIs that expect null terminated strings.
mContentDispositionFilename->ReplaceChar(char16_t(0), '_');
return NS_OK;
}
+1 -1
View File
@@ -1149,4 +1149,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
static const int32_t kUnknownId = -1;
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1603721907070000);
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1606140771955000);
File diff suppressed because it is too large Load Diff
@@ -1240,6 +1240,8 @@ nsExternalAppHandler::nsExternalAppHandler(nsIMIMEInfo * aMIMEInfo,
// replace platform specific path separator and illegal characters to avoid any confusion
mSuggestedFileName.ReplaceChar(KNOWN_PATH_SEPARATORS FILE_ILLEGAL_CHARACTERS, '_');
// If null is in an extension, we should assert (see bug 1637745).
mSuggestedFileName.ReplaceChar(char16_t(0), '_');
mTempFileExtension.ReplaceChar(KNOWN_PATH_SEPARATORS FILE_ILLEGAL_CHARACTERS, '_');
// Remove unsafe bidi characters which might have spoofing implications (bug 511521).
@@ -2579,6 +2581,8 @@ NS_IMETHODIMP nsExternalHelperAppService::GetFromTypeAndExtension(const nsACStri
NS_PRECONDITION(!aMIMEType.IsEmpty() ||
!aFileExt.IsEmpty(),
"Give me something to work with");
MOZ_DIAGNOSTIC_ASSERT(aFileExt.FindChar('\0') == kNotFound,
"The extension should never contain null characters");
LOG(("Getting mimeinfo from type '%s' ext '%s'\n",
PromiseFlatCString(aMIMEType).get(), PromiseFlatCString(aFileExt).get()));