Граф коммитов

2330 Коммитов

Автор SHA1 Сообщение Дата
Dimi Lee 6a62a08c2a Bug 1637194 - P3. StoragePrincipalHelper uses firstPartyDomain in CookieJarSetting r=timhuang,baku
Differential Revision: https://phabricator.services.mozilla.com/D75278
2020-05-19 09:47:32 +00:00
Sebastian Streich b70610980a Bug 1633710 - Move js uri.hostPort to principal r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73240
2020-05-18 13:50:14 +00:00
Sebastian Streich 1ec5974790 Bug 1636148 - "BandAid" - Cast Remaining Callers To BasePrincipal r=ckerschb,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D74248
2020-05-14 19:42:57 +00:00
Andrea Marchesini af077809cd Bug 1635490 - Implement ExpandedPrincipal::IsThirdPartyURI() to consider any sub principal's URI, r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D74163
2020-05-13 16:50:19 +00:00
ssengupta cf852bbfb9 Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73868
2020-05-12 19:02:05 +00:00
Sebastian Hengst 8d6dfb7be7 Backed out changeset ea15e5bb899e (bug 1625845) for causing bug 1634056. a=backout 2020-05-12 18:48:22 +02:00
Dorel Luca c269f23ce0 Backed out 2 changesets (bug 1636148) for Build bustage on android in gecko/widget/android/nsWindow.cpp. CLOSED TREE
Backed out changeset fca4a9808bd9 (bug 1636148)
Backed out changeset 6fda7ca2484d (bug 1636148)
2020-05-12 17:01:59 +03:00
Sebastian Streich 8dc87b9987 Bug 1636148 - "BandAid" - Cast Remaining Callers To BasePrincipal r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D74248
2020-05-12 12:50:21 +00:00
Stefan Hindli 9d278a82c2 Backed out changeset 8a194fc3bf96 (bug 1634411) for causing perma bc2 failure in browser/components/originattributes/test/browser/browser_postMessage.js CLOSED TREE 2020-04-30 19:08:34 +03:00
Andrea Marchesini 51cf3a80ab Bug 1634411 - Relax principal checks in PostMessageEvent, r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D73268
2020-04-30 14:22:25 +00:00
Sebastian Streich f5bf1cde94 Bug 1625845 - Remove GetUri in Navigator.cpp r=ckerschb,baku
Differential Revision: https://phabricator.services.mozilla.com/D68749
2020-04-28 14:52:09 +00:00
Sebastian Streich 6513f176fe Bug 1630372 - remove geturi in nsNetUtil.cpp r=ckerschb,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D71091
2020-04-27 10:54:47 +00:00
Sebastian Streich ea62971514 Bug 1623417 - Refactor nsPermission.cpp r=ckerschb
***

Differential Revision: https://phabricator.services.mozilla.com/D67371
2020-04-23 13:11:56 +00:00
Andreea Pavel b3dd6514f9 Backed out changeset 1911a552da5c (bug 1630372) for breaking bc at /browser_bug1453818_samesite_cookie.js on a CLOSED TREE 2020-04-22 22:10:05 +03:00
Sebastian Streich f5124517c8 Bug 1630372 - remove geturi in nsNetUtil.cpp r=ckerschb,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D71091
2020-04-22 15:21:54 +00:00
Noemi Erli b611a44386 Backed out changeset a2bff0eef797 (bug 1623417) for causing xpcshell failures in test_permmanager_matchesuri.js CLOSED TREE 2020-04-20 20:09:23 +03:00
Sebastian Streich bb11628699 Bug 1623417 - Refactor nsPermission.cpp r=ckerschb
***

Differential Revision: https://phabricator.services.mozilla.com/D67371
2020-04-20 15:59:44 +00:00
Andrea Marchesini 5e2698efa8 Bug 1630865 - Implement nsICookieService::getCookieStringForPrincipal() - part 1 - nsIPrincipal methods, r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D71275
2020-04-20 10:01:54 +00:00
Sebastian Streich 3c19d7435a Bug 1623334 - Refactor nsDocShell Geturi usage r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D67325
2020-04-20 09:43:22 +00:00
Sebastian Streich c0401ba16f Bug 1620402 - Refactor nsPermissionManager.cpp r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D65606
2020-04-20 09:53:40 +00:00
Christoph Kerschbaumer b9d1facf55 Bug 1353429: Test Principal URI escaping.r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D66997
2020-04-16 10:58:38 +00:00
Marco Bonardo fb0662edda Bug 1628906 - First search in a tab from location bar could trigger an "Invalid URL" error page. r=Gijs,nika,mattwoodrow
Before 1496578, URIFixup::keywordToURI used to do a synchronous IPC call to be
able to access search engines from the content process. Consumers of URIFixup
didn't care. Bug 1496578 moved the IPC messaging to the callers, in particular
nsDocShell, but assumed nsDocShellLoadState wasn't loading from content.
It looks like in some cases it does, so this adds another sync IPC call for
GetFixupURIInfo.
The total numer of sync IPCs should not change from before Bug 1496578, URIFIxup
was just doing it internally, while now it happens at the call point.
Note the long term plan would be for these docshell objects callers to just
handle URIs, while the UI code should do fixup.
Bug 1375244 tracks the removal of these sync IPC messages.

Differential Revision: https://phabricator.services.mozilla.com/D70607

--HG--
extra : moz-landing-system : lando
2020-04-15 22:39:38 +00:00
Sebastian Streich 6ca53143cb Bug 1620624 - Refactor nsUrlClassifier r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D65758

--HG--
extra : moz-landing-system : lando
2020-04-14 21:48:38 +00:00
Cosmin Sabou a02a553ad4 Backed out changeset 8523af037d8f (bug 1629763) for causing assertion failures on WorkerPrivate.cpp. CLOSED TREE 2020-04-14 16:03:09 +03:00
Andrea Marchesini 2be753c938 Bug 1629763 - ContentPrincipal::GetBaseDomain returns a void-string for resource: URIs, r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D70804

--HG--
extra : moz-landing-system : lando
2020-04-14 08:47:48 +00:00
Michal Novotny 2a483b2bc4 Bug 1622409 - Put FTP code behind a pref r=marionette-reviewers,valentin,whimboo,mixedpuppy
Disables FTP protocol handler on nightly. FTP scheme is handled by external protocol handler if it isn't explicitly disabled with preference network.protocol-handler.external.ftp = false.

Differential Revision: https://phabricator.services.mozilla.com/D68974

--HG--
extra : moz-landing-system : lando
2020-04-07 19:49:26 +00:00
Mike Conley a98dabe6ec Bug 1184701 - Make the moz-page-thumb protocol work in the privileged about content process. r=haik,valentin
Differential Revision: https://phabricator.services.mozilla.com/D68281

--HG--
extra : moz-landing-system : lando
2020-04-06 17:46:52 +00:00
Oana Pop Rus 36c2983278 Backed out 2 changesets (bug 1184701) for node(newtab) and xpc failures in test_thumbnails_interfaces.js. on a CLOSED TREE
Backed out changeset 241a6d4f2f23 (bug 1184701)
Backed out changeset f753bddc4131 (bug 1184701)
2020-04-06 19:24:00 +03:00
Mike Conley 0e019bbef5 Bug 1184701 - Make the moz-page-thumb protocol work in the privileged about content process. r=haik,valentin
Differential Revision: https://phabricator.services.mozilla.com/D68281

--HG--
extra : moz-landing-system : lando
2020-03-31 22:40:11 +00:00
sonakshi a6f08454e0 Bug 1622619 - Replace URIParams with nsIURI in PContent.ipdl r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D67729

--HG--
extra : moz-landing-system : lando
2020-03-31 18:47:30 +00:00
Razvan Maries 40412d7928 Backed out changeset 2515c5b5a0d2 (bug 1622619) for build bustages. CLOSED TREE 2020-03-31 17:18:38 +03:00
sonakshi fc4a38cd03 Bug 1622619 - Replace URIParams with nsIURI in PContent.ipdl r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D67729

--HG--
extra : moz-landing-system : lando
2020-03-31 13:38:55 +00:00
Dorel Luca c1b65ae5b8 Backed out changeset 1ed0cfd336dd (bug 1353429) for conflict with backed out (Bug 1620624). CLOSED TREE 2020-03-30 20:14:17 +03:00
Sebastian Hengst 2e7a5a707a Backed out changeset b82effbcaabc (Bug 1620624) for likely causing performance regression Bug 1625071.
--HG--
extra : rebase_source : 86bf97f4430a9afa5dd0c513785134029fedf4ae
2020-03-30 17:45:39 +02:00
Cosmin Sabou 2db886518c Backed out changeset 848221b2e156 (bug 1620402) for causing several test failures.
CLOSED TREE
2020-03-30 11:35:20 +03:00
Sebastian Streich e23cc2cd7f Bug 1620402 - Refactor nsPermissionManager.cpp r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D65606

--HG--
extra : moz-landing-system : lando
2020-03-30 07:34:37 +00:00
Sebastian Streich 5577df21f9 Bug 1615297 - Move Localstorage Keygen into Principal r=ckerschb,baku
Differential Revision: https://phabricator.services.mozilla.com/D62757

--HG--
extra : moz-landing-system : lando
2020-03-29 15:31:24 +00:00
Sebastian Streich f7280c333b Bug 1622042 - Refactor NsContentUtils:Allowsl10n r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D66633

--HG--
extra : moz-landing-system : lando
2020-03-26 13:18:40 +00:00
Sebastian Streich 283d6ba1ab Bug 1600051 - Remove geturi Call in ReferrerInfo.cpp r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D68028

--HG--
extra : moz-landing-system : lando
2020-03-25 14:38:42 +00:00
Christoph Kerschbaumer 3e884ce321 Bug 1188538: Ensure every protocol handler sets a valid security flag. r=bholley,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D67496

--HG--
extra : moz-landing-system : lando
2020-03-20 08:25:18 +00:00
Stefan Hindli 91f4c18048 Backed out 4 changesets (bug 1622042) for causing AddonInstallException: Could not install add-on: c:\users\task_1584560140\appdata\local\temp\tmpbg9_h7.zip: ERROR_FILE_ACCESS: There was an error accessing the filesystem. CLOSED TREE
Backed out changeset 929043330599 (bug 1622042)
Backed out changeset b08cdd075e20 (bug 1622042)
Backed out changeset ca87f1c6b90b (bug 1622042)
Backed out changeset 27dbbb7cd590 (bug 1622042)
2020-03-18 22:49:23 +02:00
Sebastian Streich 56a7a311d1 Bug 1622042 - Refactor NsContentUtils:Allowsl10n r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D66633

--HG--
extra : moz-landing-system : lando
2020-03-18 16:00:40 +00:00
Cosmin Sabou 029804e3f7 Backed out 4 changesets (bug 1622042) for causing build bustages on nsContentUtils.cpp. CLOSED TREE
Backed out changeset dc7af5abb8de (bug 1622042)
Backed out changeset 16e3b4a1fefc (bug 1622042)
Backed out changeset f60b16588dad (bug 1622042)
Backed out changeset 4193aea26e28 (bug 1622042)

--HG--
extra : amend_source : 2f2befe5703f683ccaac6d634fc4a262db9fff86
2020-03-17 20:38:35 +02:00
Sebastian Streich 63b92a302c Bug 1622042 - Refactor NsContentUtils:Allowsl10n r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D66633

--HG--
extra : moz-landing-system : lando
2020-03-17 17:11:42 +00:00
Christoph Kerschbaumer 2244f338fc Bug 1353429: Test Principal URI escaping.r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D66997

--HG--
extra : moz-landing-system : lando
2020-03-17 14:05:22 +00:00
Brindusan Cristian 426b685bf7 Backed out changeset 21aedccf1abb (bug 1353429) for ESlint failure. CLOSED TREE 2020-03-17 14:10:52 +02:00
Christoph Kerschbaumer f03e90da15 Bug 1353429: Test Principal URI escaping.r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D66997

--HG--
extra : moz-landing-system : lando
2020-03-17 07:12:08 +00:00
Marco Bonardo 2dc20c6432 Bug 1621328 - Move CreateExposableURI into nsIOService. r=Gijs,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D66269

--HG--
extra : moz-landing-system : lando
2020-03-13 12:44:36 +00:00
Christoph Kerschbaumer 8e374dc349 Bug 1141959: Test nsIPrincipal.origin treats IPv6 host correctly.r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D66056

--HG--
extra : moz-landing-system : lando
2020-03-13 16:00:39 +00:00
Sebastian Streich c7989b585d Bug 1621310 - Remove geturi in ContentPrincipal.cpp r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D66250

--HG--
extra : moz-landing-system : lando
2020-03-12 19:47:56 +00:00
Christoph Kerschbaumer 131117226a Bug 1621667: Remove unnecessary semicolon in BasePrincipal. r=sstreich
Differential Revision: https://phabricator.services.mozilla.com/D66415

--HG--
extra : moz-landing-system : lando
2020-03-11 15:52:18 +00:00
Daniel Varga 8edab673d8 Backed out changeset d15b968aa6d1 (bug 1615297) for causing build bustage
CLOSED TREE

--HG--
extra : rebase_source : 4e525e82fb7f194d9b7eac0020932ed09ac005b7
2020-03-11 05:41:51 +02:00
Sebastian Streich 1f23aca56c Bug 1615297 - Move Localstorage Keygen into Principal r=ckerschb,baku
Differential Revision: https://phabricator.services.mozilla.com/D62757

--HG--
extra : moz-landing-system : lando
2020-03-10 18:10:08 +00:00
Sebastian Streich fbb2bf6422 Bug 1620624 - Refactor nsUrlClassifier r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D65758

--HG--
extra : moz-landing-system : lando
2020-03-10 13:13:02 +00:00
Sebastian Streich 115092bca7 Bug 1620292 - Remove Geturi usage in XPCJSRuntime.cpp r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D65562

--HG--
extra : moz-landing-system : lando
2020-03-09 13:28:03 +00:00
Mark Banner 2c4e35b0a6 Bug 1620218 - Automatic code fixes for Prettier 1.18.2 upgrade. r=mossop,webcompat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D65509

--HG--
extra : moz-landing-system : lando
2020-03-08 21:45:16 +00:00
Mark Banner 15cfe23b88 Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D65703

--HG--
extra : moz-landing-system : lando
2020-03-07 10:09:44 +00:00
Noemi Erli cae18cfff0 Backed out changeset ae75c4984b1b (bug 1620292) for causing bustages in BasePrincipal.h CLOSED TREE 2020-03-06 23:02:03 +02:00
Sebastian Streich 69d07ec477 Bug 1620292 - Remove Geturi usage in XPCJSRuntime.cpp r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D65562

--HG--
extra : moz-landing-system : lando
2020-03-06 20:04:33 +00:00
Christoph Kerschbaumer bb063aba96 Bug 1417655: Mark private operator= delete for NullPrincipalURI since there is a private copy constr.r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D65371

--HG--
extra : moz-landing-system : lando
2020-03-05 16:42:57 +00:00
Sebastian Streich 7f6af6cae2 Bug 1619745: Remove GetUri usage in nsSyncLoadService.cpp r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D65201

--HG--
extra : moz-landing-system : lando
2020-03-05 13:42:13 +00:00
Sebastian Streich de4695b650 Bug 1615259 - Refactor GetUri in WorkerLoadInfo.cpp r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D62737

--HG--
extra : moz-landing-system : lando
2020-03-03 12:58:38 +00:00
Sebastian Streich db60c34f97 Bug 1618241 - Move CreateQuotaDBKey to nsIPrincipal r=ckerschb,baku
Differential Revision: https://phabricator.services.mozilla.com/D64391

--HG--
extra : moz-landing-system : lando
2020-02-27 00:22:27 +00:00
J.C. Jones 56fa739a54 Bug 1616675 - Add isIpAddress to nsIPrincipal r=ckerschb
Adds an infallable boolean attribute to nsIPrincipal that indicates whether
the principal's host is an IP address.

Adds a gtest to exercise that part of the nsIPrincipal.

/**
 * Returns if the principal is an IP address.
 */
[infallible] readonly attribute boolean isIpAddress;

Differential Revision: https://phabricator.services.mozilla.com/D63966

--HG--
extra : moz-landing-system : lando
2020-02-26 23:15:43 +00:00
Brindusan Cristian cec1932e5b Backed out changeset 270d0ffaf825 (bug 1615259) for build bustages at BasePrincipal.h. CLOSED TREE 2020-02-26 16:21:03 +02:00
Sebastian Streich d694e543b1 Bug 1615259 - Refactor GetUri in WorkerLoadInfo.cpp r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D62737

--HG--
extra : moz-landing-system : lando
2020-02-26 13:52:01 +00:00
Sebastian Streich a555462429 Bug 1605191 - Make new nsIPrincipal attributes camelcase. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D62769

--HG--
extra : moz-landing-system : lando
2020-02-24 17:04:45 +00:00
Sebastian Streich 4018f86453 Bug 1615321 - Remove GetUri call in StorageObserver r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D62765

--HG--
extra : moz-landing-system : lando
2020-02-24 16:57:40 +00:00
Sebastian Streich 7800cfd4ef Bug 1615029 - Remove GetURI calls from CorsListenerProxy r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D62630

--HG--
extra : moz-landing-system : lando
2020-02-17 13:57:41 +00:00
Tom Schuster 7c32ce1560 Bug 1615405 - `eval(nonString)` should not have observable side effects. r=tcampbell,baku
After this change we can restrict contentSecurityPolicyAllows callbacks to just strings, because everything
else is excluded before calling that callback.

Differential Revision: https://phabricator.services.mozilla.com/D62794

--HG--
extra : moz-landing-system : lando
2020-02-14 15:05:27 +00:00
Bogdan Tara 2a147d1696 Backed out changeset bc387540075d (bug 1615405) on evilpie's request CLOSED TREE 2020-02-14 14:34:53 +02:00
Tom Schuster 140762b57e Bug 1615405 - `eval(nonString)` should not have observable side effects. r=tcampbell,baku
After this change we can restrict contentSecurityPolicyAllows callbacks to just strings, because everything
else is excluded before calling that callback.

Differential Revision: https://phabricator.services.mozilla.com/D62794

--HG--
extra : moz-landing-system : lando
2020-02-14 12:26:21 +00:00
Tom Ritter 362986be19 Bug 1599226 - Suppress Hazard Analysis through nsJSPrincipals::isSystemOrAddonPrincipal r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D62771

--HG--
extra : moz-landing-system : lando
2020-02-13 19:10:14 +00:00
Sebastian Streich 0c4f11b187 Bug 1608862 : refactor GetURI usage in BlobURLProtocolHandler.cpp r=ckerschb
***
 Add get Prepath

Differential Revision: https://phabricator.services.mozilla.com/D59731

--HG--
extra : moz-landing-system : lando
2020-02-12 16:13:19 +00:00
Simon Giesecke 1e5c4a7749 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in caps. r=smaug
Depends on D62569

Differential Revision: https://phabricator.services.mozilla.com/D62570

--HG--
extra : moz-landing-system : lando
2020-02-12 13:39:13 +00:00
Sebastian Streich b53c4508e9 Bug 1610835 - Refactor GetURI usage in AntiTrackingCommon.cpp r=ckerschb,baku
Differential Revision: https://phabricator.services.mozilla.com/D60684

--HG--
extra : moz-landing-system : lando
2020-02-10 15:10:52 +00:00
Emilio Cobos Álvarez 322cec0c5e Bug 1612510 - Remove IsChromeOrXBL*. r=bzbarsky
XBL is no longer a thing... Also, should we rename AllowContentXBLScope?

Differential Revision: https://phabricator.services.mozilla.com/D61359

--HG--
extra : moz-landing-system : lando
2020-02-04 21:28:57 +00:00
Sebastian Streich be513b0703 Bug 1594781 -- Refactor nsGlobalWindowOuter r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D52186

--HG--
extra : moz-landing-system : lando
2020-01-22 17:14:08 +00:00
Sylvestre Ledru c521758c5e Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D58175

--HG--
extra : moz-landing-system : lando
2020-01-09 21:50:11 +00:00
Jonathan Kingston c6ab4134b8 Bug 1605191 - Make nsIPrincipal attributes camelcase. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D58537

--HG--
extra : moz-landing-system : lando
2020-01-07 09:53:21 +00:00
Sebastian Streich cb5e45fc61 Bug 1601944 - Refactor nsDataDocumentContentPolicy.cpp r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D56186

--HG--
extra : moz-landing-system : lando
2020-01-06 15:30:35 +00:00
Kris Maglione 94e3b0bd8d Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740

--HG--
extra : moz-landing-system : lando
2019-12-13 20:36:16 +00:00
Boris Zbarsky ee1cc488f2 Bug 1602483 part 2. Add a window id argument to CheckLoadURIWithPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D56428

--HG--
rename : devtools/client/webconsole/test/browser/browser_webconsole_same_origin_errors.js => devtools/client/webconsole/test/browser/browser_webconsole_checkloaduri_errors.js
rename : devtools/client/webconsole/test/browser/test-same-origin-required-load.html => devtools/client/webconsole/test/browser/test-checkloaduri-failure.html
extra : moz-landing-system : lando
2019-12-12 16:41:19 +00:00
Boris Zbarsky cbc90e1aca Bug 1602090 part 2. Create separate CheckMayLoad and CheckMayLoadWithReporting APIs. r=ckerschb
CheckMayLoadAndReport takes a window ID.  This allows us to report
errors from it to the web console as needed.  Most consumers know statically
whether they want reporting or not, so there's no reason to force the ones that
don't to provide window ids.

Differential Revision: https://phabricator.services.mozilla.com/D56388

--HG--
extra : moz-landing-system : lando
2019-12-13 06:24:12 +00:00
Boris Zbarsky 5360bbc908 Bug 1602090 part 1. Add a window id argument to nsScriptSecurityManager::ReportError. r=ckerschb
This will allow the errors reported via this method to show up in the web console as needed.

Differential Revision: https://phabricator.services.mozilla.com/D56386

--HG--
extra : moz-landing-system : lando
2019-12-12 16:41:26 +00:00
Sebastian Streich 938f258c79 Bug 1602419 - Fix Security Error flood r=ckerschb
I falsely did set the ReportError flag to aRes instead of false, which was flooding the console.

Differential Revision: https://phabricator.services.mozilla.com/D56379

--HG--
extra : moz-landing-system : lando
2019-12-12 17:40:03 +00:00
Ciure Andrei 6c95adafed Backed out 4 changesets (bug 1602483, bug 1602090) for causing perma leackchecks CLOSED TREE
Backed out changeset 6b057ba06b4a (bug 1602483)
Backed out changeset 9be3269d781d (bug 1602483)
Backed out changeset e3e2c1d7478e (bug 1602090)
Backed out changeset fdc4a588912e (bug 1602090)
2019-12-12 18:37:01 +02:00
Boris Zbarsky 4425adb1cc Bug 1602483 part 2. Add a window id argument to CheckLoadURIWithPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D56428

--HG--
rename : devtools/client/webconsole/test/browser/browser_webconsole_same_origin_errors.js => devtools/client/webconsole/test/browser/browser_webconsole_checkloaduri_errors.js
rename : devtools/client/webconsole/test/browser/test-same-origin-required-load.html => devtools/client/webconsole/test/browser/test-checkloaduri-failure.html
extra : moz-landing-system : lando
2019-12-12 13:05:12 +00:00
Boris Zbarsky e0acf6e9fc Bug 1602090 part 2. Create separate CheckMayLoad and CheckMayLoadWithReporting APIs. r=ckerschb
CheckMayLoadAndReport takes a window ID.  This allows us to report
errors from it to the web console as needed.  Most consumers know statically
whether they want reporting or not, so there's no reason to force the ones that
don't to provide window ids.

Differential Revision: https://phabricator.services.mozilla.com/D56388

--HG--
extra : moz-landing-system : lando
2019-12-12 13:03:42 +00:00
Boris Zbarsky 9736474e72 Bug 1602090 part 1. Add a window id argument to nsScriptSecurityManager::ReportError. r=ckerschb
This will allow the errors reported via this method to show up in the web console as needed.

Differential Revision: https://phabricator.services.mozilla.com/D56386

--HG--
extra : moz-landing-system : lando
2019-12-12 13:03:42 +00:00
Sebastian Streich 8b390d55c7 Bug 1601941 - Refactor GetURI usage in nsScriptSecurityManager.cpp r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D56185

--HG--
extra : moz-landing-system : lando
2019-12-11 16:21:18 +00:00
shindli 91924fedc7 Backed out 9 changesets (bug 1596918) for causing mochitest permafailures in toolkit/content/tests/chrome/test_findbar_events.xhtml CLOSED TREE
Backed out changeset 45a1c42118f2 (bug 1596918)
Backed out changeset db09910ffa56 (bug 1596918)
Backed out changeset 5c9d9f141c10 (bug 1596918)
Backed out changeset 6a135670d603 (bug 1596918)
Backed out changeset 3a0184e0df72 (bug 1596918)
Backed out changeset 2f0036486823 (bug 1596918)
Backed out changeset a770c6d08d52 (bug 1596918)
Backed out changeset ef062eb7a6ee (bug 1596918)
Backed out changeset a6ea596e98db (bug 1596918)
2019-12-11 03:09:26 +02:00
Kris Maglione 16a9b29848 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740

--HG--
extra : moz-landing-system : lando
2019-12-10 23:07:13 +00:00
Boris Zbarsky 1a285c6f35 Bug 1601377 part 1. Make it clear that nsContentUtils::PrincipalAllowsL10n never takes a null nsIPrincipal. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D56216

--HG--
extra : moz-landing-system : lando
2019-12-09 15:10:32 +00:00
Noemi Erli 82d41a33b2 Backed out 9 changesets (bug 1596918) for causing multiple browser-chrome failures
Backed out changeset 415007efd8c9 (bug 1596918)
Backed out changeset 011eb5ce927b (bug 1596918)
Backed out changeset e5fd3ee22ea1 (bug 1596918)
Backed out changeset 0bca4de31d40 (bug 1596918)
Backed out changeset 11ec4393f23d (bug 1596918)
Backed out changeset c5404a7c286d (bug 1596918)
Backed out changeset 7e9304405a46 (bug 1596918)
Backed out changeset fa0f0aeabf99 (bug 1596918)
Backed out changeset de196b077000 (bug 1596918)
2019-12-07 22:26:43 +02:00
Kris Maglione 910eab35d2 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740

--HG--
extra : moz-landing-system : lando
2019-12-07 19:11:58 +00:00
Daniel Varga 84a601a6d4 Backed out 17 changesets (bug 1596918) for multiple browser-chrome and dev-tools failures. On a CLOSED TREE
Backed out changeset ab87d2c1afae (bug 1596918)
Backed out changeset 775f3b06a687 (bug 1596918)
Backed out changeset 67cc63ef5d7f (bug 1596918)
Backed out changeset 7d290bcd2067 (bug 1596918)
Backed out changeset 048db9f4db7c (bug 1596918)
Backed out changeset 96a79d2ba614 (bug 1596918)
Backed out changeset be770d112dd8 (bug 1596918)
Backed out changeset 302c8ab8391c (bug 1596918)
Backed out changeset 44ef8f20732e (bug 1596918)
Backed out changeset 38c11ebfb8ff (bug 1596918)
Backed out changeset b586fc081374 (bug 1596918)
Backed out changeset 12283166716f (bug 1596918)
Backed out changeset 99b0421015d8 (bug 1596918)
Backed out changeset 97ec49dbbbf3 (bug 1596918)
Backed out changeset ec79478f58f1 (bug 1596918)
Backed out changeset c6d356833bb8 (bug 1596918)
Backed out changeset 5ef6026806c8 (bug 1596918)
2019-12-07 03:12:07 +02:00
Kris Maglione 20da940e14 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740

--HG--
extra : moz-landing-system : lando
2019-12-06 22:14:14 +00:00
Sebastian Streich ef70bebbdc Bug 1600051 - Refactor GetURI usage in ReferrerInfo.cpp r=ckerschb
***

Differential Revision: https://phabricator.services.mozilla.com/D55120

--HG--
extra : moz-landing-system : lando
2019-12-06 12:32:27 +00:00
Gabriele Svelto 69790bc62e Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55443

--HG--
extra : moz-landing-system : lando
2019-12-06 09:16:44 +00:00
Sebastian Streich 7809758d00 Bug 1597704 - Move is OriginPotentially Trustworthy into Principal r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D53830

--HG--
extra : moz-landing-system : lando
2019-12-05 16:04:53 +00:00
Boris Zbarsky 75124bdd98 Bug 1517588. Use nsIPrincipal::IsSystemPrincipal instead of nsContentUtils::IsSystemPrincipal r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D53067

--HG--
extra : moz-landing-system : lando
2019-12-05 04:44:32 +00:00
Emma Malysz a1ae71dcf8 Bug 1601095, rename the test files in /cap from .xul to .xhtml r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D55832

--HG--
rename : caps/tests/mochitest/test_bug995943.xul => caps/tests/mochitest/test_bug995943.xhtml
rename : caps/tests/mochitest/test_disableScript.xul => caps/tests/mochitest/test_disableScript.xhtml
extra : moz-landing-system : lando
2019-12-04 20:24:47 +00:00
Liang-Heng Chen 78474bf392 Bug 1534339 - make OriginAttributes deserializable; r=baku
`CreateSuffix` is irreversible by `PopulateFromSuffix` because it uses a multi-to-one mapping.
Since only ':' will happen in a IPv6 format, we can make it a 1-to-1 mapping so that the `firstPartyDomain` is consistent after `CreateSuffix` and `PopulateFromSuffix`.

Differential Revision: https://phabricator.services.mozilla.com/D47910

--HG--
extra : moz-landing-system : lando
2019-12-04 09:46:51 +00:00
Nathan Froyd c4d5bb1a19 Bug 1600963 - remove some duplicate includes from ContentPrincipal.cpp; r=mccr8
Depends on D55689

Differential Revision: https://phabricator.services.mozilla.com/D55690

--HG--
extra : moz-landing-system : lando
2019-12-03 17:30:26 +00:00
Nathan Froyd 655d31fb03 Bug 1600963 - build fields directly in the returned array; r=mccr8
This change means fewer temporary objects, particularly `nsCString` objects.

Depends on D55688

Differential Revision: https://phabricator.services.mozilla.com/D55689

--HG--
extra : moz-landing-system : lando
2019-12-03 17:37:43 +00:00
Nathan Froyd 03bf239fb9 Bug 1600963 - don't lookup keys twice in the serialized JSON; r=mccr8
Depends on D55687

Differential Revision: https://phabricator.services.mozilla.com/D55688

--HG--
extra : moz-landing-system : lando
2019-12-03 17:52:40 +00:00
Nathan Froyd feb4f82205 Bug 1600963 - reduce size of principal KeyVals; r=mccr8
By declaring the individual enum types to fit in a `uint8_t`, and
rearranging the templated `KeyValT` struct, we can pack `KeyValT`
to save a word of storage.

Differential Revision: https://phabricator.services.mozilla.com/D55687

--HG--
extra : moz-landing-system : lando
2019-12-03 22:20:03 +00:00
Nathan Froyd 3c6e6ca1c9 Bug 1600963 - reduce boilerplate for serialized keys in principals; r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D55686

--HG--
extra : moz-landing-system : lando
2019-12-03 17:30:09 +00:00
shindli f3f1c30ea4 Backed out changeset 68ff34ec8e96 (bug 1597704) for causing perma bc3 failures in browser/extensions/formautofill/test/browser/browser_autocomplete_footer.js CLOSED TREE 2019-11-28 16:12:45 +02:00
Sebastian Streich e00f41deb2 Bug 1597704 - Move is OriginPotentially Trustworthy into Principal r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D53830

--HG--
extra : moz-landing-system : lando
2019-11-28 12:44:29 +00:00
Sebastian Streich a79df87bcc Bug 1589690 : Add isOnion API r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D49751

--HG--
extra : moz-landing-system : lando
2019-11-28 09:22:17 +00:00
Andrew McCreight 139398a824 Bug 1599569 - Make nsScriptSecurityManager::ClearJSCallbacks into a static method. r=kmag
XPConnect calls this method during shutdown after the pointer to the
singleton nsScriptSecurityManager has been cleared, so it is actually
calling it with a null |this|. Nobody noticed this because it isn't
actually using |this|. This patch turns it into a static method to
make the sanitizers happy.

Differential Revision: https://phabricator.services.mozilla.com/D54846

--HG--
extra : moz-landing-system : lando
2019-11-27 20:57:43 +00:00
Andrew McCreight 817696d634 Bug 1599801 - NullPrincipal::Init is infallible. r=bzbarsky
I also cleaned up the comment a bit.

Differential Revision: https://phabricator.services.mozilla.com/D54970

--HG--
extra : moz-landing-system : lando
2019-11-27 20:17:46 +00:00
Andrew McCreight b7a0475f37 Bug 1599470, part 2 - Inline the now-infallible NullPrincipalURI::Create(). r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D54818

--HG--
extra : moz-landing-system : lando
2019-11-27 16:08:28 +00:00
Andrew McCreight b0c1237a6f Bug 1599470, part 1 - Inline the infallible NullPrincipalURI::Init. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D54817

--HG--
extra : moz-landing-system : lando
2019-11-27 04:41:07 +00:00
Gurzau Raul 865834687b Backed out changeset 74162d71ef4d (bug 1597704) for failing at browser_insecurePasswordConsoleWarning.js on a CLOSED TREE. 2019-11-26 19:30:19 +02:00
Sebastian Streich a22a53ebb2 Bug 1597704 - Move is OriginPotentially Trustworthy into Principal r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D53830

--HG--
extra : moz-landing-system : lando
2019-11-26 16:00:49 +00:00
Jan de Mooij 83d309574b Bug 1579367 - Initialize XPCJSContext explicitly, after loading user prefs. r=kmag
This way we get the correct values for start-up prefs in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D51061

--HG--
extra : moz-landing-system : lando
2019-11-22 12:40:17 +00:00
Razvan Maries c5d796f8ad Backed out changeset 4082b974a1e6 (bug 1597704) test_isOriginPotentiallyTrustworthy.js. CLOSED TREE 2019-11-22 13:35:36 +02:00
Sebastian Streich 309ac043a0 Bug 1597704 - Move is OriginPotentially Trustworthy into Principal r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D53830

--HG--
extra : moz-landing-system : lando
2019-11-21 16:29:13 +00:00
Andreea Pavel f12302bb4f Backed out changeset 4757e1fd407f (bug 1594781) for failing wpt at iframe_sandbox_popups_escaping-1.html on a CLOSED TREE 2019-11-20 07:26:52 +02:00
Sebastian Streich c1543aa8e0 Bug 1594781 -- Refactor nsGlobalWindowOuter r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D52186

--HG--
extra : moz-landing-system : lando
2019-11-19 15:14:43 +00:00
Mihai Alexandru Michis 33799b6110 Backed out changeset 14d6dd504f86 (bug 1534339) for causing Bug 1595179. CLOSED TREE
--HG--
extra : rebase_source : 101262411debddee38453d05fdfb7327fe03438e
extra : histedit_source : 1ddb09ebad301dfc19bccf12386e7d0beb43cb1a
2019-11-14 14:59:16 +02:00
Sebastian Streich b4ebe9b54a Bug 1592701 - Remove usage of GetURI in nsGlobalWindowInner r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D51258

--HG--
extra : moz-landing-system : lando
2019-11-07 13:42:37 +00:00
Dorel Luca a0370f2bc4 Backed out changeset 955256297d6d (bug 1579367) for causing a top crash in Bug 1594404. a=backout 2019-11-06 23:19:09 +02:00
Jan de Mooij 96cc0b5247 Bug 1579367 - Initialize XPCJSContext explicitly, after loading user prefs. r=kmag
This way we get the correct values for start-up prefs in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D51061

--HG--
extra : moz-landing-system : lando
2019-11-05 06:29:13 +00:00
Nicholas Nethercote a518709339 Bug 1587162 - Fix UBSAN complaints about pref callbacks. r=erahm
Lots of these callbacks have a non-`void*` final parameter, which UBSAN
complains about. This commit changes them to have a `void*` parameter.

This requires undoing the machinery added in the first two commits of bug
1473631: `TypePrefChangeFunc` and `PREF_CHANGE_METHOD`. The resulting code is
simpler (which is good) and more boilerplate-y (which is bad) but avoids the
undefined behaviour (which is good).

Differential Revision: https://phabricator.services.mozilla.com/D50901

--HG--
extra : moz-landing-system : lando
2019-11-01 02:57:20 +00:00
Shane Caraveo 4c305ddd57 Bug 1587939 enforce addon content script CSP in eval r=ckerschb,robwu
Differential Revision: https://phabricator.services.mozilla.com/D48924

--HG--
extra : moz-landing-system : lando
2019-11-01 06:03:35 +00:00
Shane Caraveo f800952de9 Bug 1581611 Part 1: add content_scripts to the extension content_security_policy r=rpl,bzbarsky
This patch adds support for including content_scripts CSP in the extensions
manifest, along with all interfaces necessary to access the CSP value.  This does not
implement actual use of the CSP for content scripts.

Differential Revision: https://phabricator.services.mozilla.com/D46824

--HG--
extra : moz-landing-system : lando
2019-11-01 06:02:45 +00:00
Shane Caraveo 9ca23aa397 Bug 1581609 rename extension contentSecurityPolicy to support multiple V3 CSP values r=rpl,webidl
Differential Revision: https://phabricator.services.mozilla.com/D46818

--HG--
extra : moz-landing-system : lando
2019-11-01 06:02:22 +00:00
Paul Zuehlcke 7b483252bd Bug 1588461 - Added OA StripAttributes flag for privateBrowsingId. r=johannh,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D49174

--HG--
extra : moz-landing-system : lando
2019-10-24 14:18:54 +00:00
Tim Huang 336cd10b0e Bug 1590032 - Propagate the first party domain when creating new browser in Fission. r=smaug
In this patch, we add the propagation of the first party domain through
the tabContext while creating OOP browsers. In the window.open() case,
we will propagate the first party domain from the opener's browser parent.
And in the frame case, we will propagate it from the manager of the
browserBridgeParent of the OOP frame.

Differential Revision: https://phabricator.services.mozilla.com/D49886

--HG--
extra : moz-landing-system : lando
2019-10-24 08:51:06 +00:00
Liang-Heng Chen 489786654f Bug 1534339 - make OriginAttributes deserializable; r=baku
`CreateSuffix` is irreversible by `PopulateFromSuffix` because it uses a multi-to-one mapping.
Since only ':' will happen in a IPv6 format, we can make it a 1-to-1 mapping so that the `firstPartyDomain` is consistent after `CreateSuffix` and `PopulateFromSuffix`.

Differential Revision: https://phabricator.services.mozilla.com/D47910

--HG--
extra : moz-landing-system : lando
2019-10-23 14:10:19 +00:00
Sebastian Streich f4b2f14328 Bug 1585664 - Add GetAsciiSpecForLogging and update callers r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D47909

--HG--
extra : moz-landing-system : lando
2019-10-22 16:03:27 +00:00
Sylvestre Ledru 7c309095ea Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
Please note that it is the first reformat with clang-format 9
I only saw a fix in the .mm file

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D49056

--HG--
extra : moz-landing-system : lando
2019-10-21 14:13:44 +00:00
Sebastian Streich 854f9b5f12 Bug 1585331 - Add nsIPrincipal::GetAboutModuleFlags r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D47775

--HG--
extra : moz-landing-system : lando
2019-10-17 13:54:41 +00:00
Marco Bonardo cff612c7b4 Bug 1586681 - Ensure URIFIxup uses the right engine when there's a separate PB engine. r=Standard8,Gijs
Add a new FIXUP_FLAG_PRIVATE_CONTEXT to nsIURIFixup, make it use the default
private search engine when it's set.
Update consumers to pass the new flag when necessary.

Differential Revision: https://phabricator.services.mozilla.com/D48741

--HG--
extra : moz-landing-system : lando
2019-10-12 12:37:51 +00:00
Tom Ritter 23ba7b6fe3 Bug 1583949 - Add a check for IsEvalAllowed to the worker callpath for eval() r=ckerschb,baku
This patch does several things.  Because Workers aren't on the main thread,
many of the things done are in the name of off main thread access.

1) Changes a parameter in IsEvalAllowed from a nsIPrincipal to a bool.
   We only used the principal to determined if it was the System Principal.
   Principals aren't thread safe and can only be accessed on Main Thread, so
   if we passed a Principal in, we would be in error. Instead only pass in
   the bool which - for workers - comes from a thread-safe location.

2) Separates out the Telemetry Event Recording and sending a message to the
   console into a new function nsContentSecurityUtils::NotifyEvalUsage. (And
   creates a runnable that calls it.)

   We do this because we will need to only call this method on the main thread.

   Telemetry Event Recording has only ever been called on the Main Thread.
   While I possibly-successfully cut it over to happen Off Main Thread (OMT)
   by porting preferences to StaticPrefs, I don't know if there were other
   threading assumptions in the Telemetry Code. So it would be much safer to
   just continue recording Event Telemetry on the main thread.

   Sending a message to the console requires calling GetStringBundleService()
   which requires main thread. I didn't investigate if this could be made
   thread-safe, I just threw it onto the main thread too.

   If, in IsEvalAllowed, we are on the main thread - we call NotifyEvalUsage
   directly. If we are not, we create a runnable which will then call
   NotifyEvalUsage for us on the main thread.

3) Ports allow_eval_with_system_principal and allow_eval_in_parent_process
   from bools to RelaxedAtomicBool - because we now check these prefs OMT.

4) In RuntimeService.cpp, adds the call to IsEvalAllowed.

5) Add resource://gre/modules/workers/require.js to the allowlist of eval
   usage. This was the script that identified this gap in the first place.
   It uses eval (twice) for structural reasons (scope and line number
   massaging.)  The contents of the eval are the result of a request to a
   uri (which may be internal, like resource://). The whole point of this
   is to implement a CommonJS require() api.

   This usage of eval is safe because the only way an attacker can inject
   into it is by either controlling the response of the uri request or
   controlling (or appending to) the argument. If they can do that, they
   are able to inject script into Firefox even if we cut this usage of eval
   over to some other type of safe(r) script loader.

   Bug 1584564 tracks making sure calls to require.js are safe.

6) Adds cld-worker.js to the allowlist. Bug 1584605 is for refactoring that
   eval usage, which is decidedly non-trivial.

7) Does _not_ enforce the eval restrictions for workers. While I've gotten
   try to be green and not throw up any instances of eval-usage by workers,
   it is much safer to deploy this is Telemetry-only mode for Workers for
   a little bit to see if anything pops up from the Nightly population.

   Bug 1584602 is for enforcing the checks.

Differential Revision: https://phabricator.services.mozilla.com/D47480

--HG--
extra : moz-landing-system : lando
2019-10-08 17:31:35 +00:00
Johann Hofmann c9dbb0c14e Bug 1554805 - Never set firstPartyDomain on origin attributes for moz-extension. r=rpl,Ehsan,tjr
Differential Revision: https://phabricator.services.mozilla.com/D47425

--HG--
extra : moz-landing-system : lando
2019-10-06 15:43:39 +00:00
Tom Ritter 117e232bdc Bug 1576254 - Add isSystemOrAddonPrincipal to JSPrincipal and nsJSPrincipals r=luke
Finally, here we add the virtual method isSystemOrAddonPrincipal to the
JSPrincipal object.

We also add it to nsJSPrincipal (where it has an easy implementation), and
to carry classes that are used by JS tests and the shell.

Differential Revision: https://phabricator.services.mozilla.com/D47477

--HG--
extra : moz-landing-system : lando
2019-10-04 17:37:36 +00:00
Sebastian Streich 1aa0b1244d Bug 1583871 Refactor ThirdpartyUtil.cpp r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D47099

--HG--
extra : moz-landing-system : lando
2019-10-02 15:10:40 +00:00
Ehsan Akhgari 7ddd78221e Bug 1577298 - Do not stop at the current document when computing the top-level principal for storage partitioning; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D47339

--HG--
rename : toolkit/components/antitracking/test/browser/browser_subResources.js => toolkit/components/antitracking/test/browser/browser_subResourcesPartitioned.js
extra : moz-landing-system : lando
2019-09-27 14:05:13 +00:00
Sebastian Streich d53a4d8d9a Bug 1580782 - Expose SchemeIs on nsIPrincipal r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D45653

--HG--
extra : moz-landing-system : lando
2019-09-26 10:47:03 +00:00
Johann Hofmann ac725e0bf7 Bug 1583233 - Add MOZ_DBG support for nsIPrincipal. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D46796

--HG--
extra : moz-landing-system : lando
2019-09-24 07:56:40 +00:00
Tom Ritter c2e992ed6e Bug 1570681 - Enforce eval restrictions in system contexts and the parent process r=ckerschb
We log to MOZ_LOG, report an error to the console, send telemetry, and in debug builds - crash

Differential Revision: https://phabricator.services.mozilla.com/D45055

--HG--
extra : moz-landing-system : lando
2019-09-19 02:32:41 +00:00
Tom Ritter 9621f537b0 Bug 1570681 - Move Eval testing logic from nsContentSecurityManager to nsContentSecurityUtils r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D45484

--HG--
extra : moz-landing-system : lando
2019-09-18 19:36:31 +00:00
Karl Tomlinson fb83797145 Bug 1578623 implement WorkletPrincipals::write() r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D44605

--HG--
extra : moz-landing-system : lando
2019-09-09 00:41:50 +00:00
Andrea Marchesini 41fd92503f Bug 1579357 - Check the arguments in BasePrincipal XPCOM methods, r=jkt
Differential Revision: https://phabricator.services.mozilla.com/D45001

--HG--
extra : moz-landing-system : lando
2019-09-09 16:45:29 +00:00
Noemi Erli d988a687b9 Backed out 9 changesets (bug 1578623) for causing Windows build bustages CLOSED TREE
Backed out changeset 52a86c60c866 (bug 1578623)
Backed out changeset e4fddd3d24b4 (bug 1578623)
Backed out changeset 65a7c4daec27 (bug 1578623)
Backed out changeset 3badf9215788 (bug 1578623)
Backed out changeset 71e58ee8f684 (bug 1578623)
Backed out changeset 0128e12a910f (bug 1578623)
Backed out changeset 8242877392bd (bug 1578623)
Backed out changeset 6d7be8a22f8b (bug 1578623)
Backed out changeset 3be609a9be36 (bug 1578623)

--HG--
extra : amend_source : b76d374926d247982773b58d12cb26e33d9972e8
2019-09-09 03:37:09 +03:00
Karl Tomlinson 18d04e5d8f Bug 1578623 implement WorkletPrincipals::write() r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D44605

--HG--
extra : moz-landing-system : lando
2019-09-06 02:10:31 +00:00
Karl Tomlinson 6b19f33045 Bug 1578623 create worklet global with JSPrincipals having reference to WorkletImpl r=baku,bzbarsky
This will permit implementation of JSPrincipals::write().

Differential Revision: https://phabricator.services.mozilla.com/D44604

--HG--
rename : dom/worklet/WorkletPrincipal.cpp => dom/worklet/WorkletPrincipals.cpp
rename : dom/worklet/WorkletPrincipal.h => dom/worklet/WorkletPrincipals.h
extra : moz-landing-system : lando
2019-09-06 02:01:44 +00:00
Nicholas Nethercote 5e22e64603 Bug 1573720 - Convert security.view-source.reachable-from-inner-protocol to a static pref. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D41912

--HG--
extra : moz-landing-system : lando
2019-08-15 05:29:35 +00:00
Sylvestre Ledru 645f2d5773 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D41559

--HG--
extra : moz-landing-system : lando
2019-08-13 07:15:25 +00:00
Brendan Dahl 0a8d6f243d Bug 1551344 - Part 2: Update outdated comments referencing XULDocument. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D41239

--HG--
extra : moz-landing-system : lando
2019-08-09 17:47:41 +00:00
Gabriele Svelto e71120d4fe Bug 1572229 - Use modern jsoncpp readers/writers when (de)serializing principals r=jkt
Differential Revision: https://phabricator.services.mozilla.com/D41088

--HG--
extra : moz-landing-system : lando
2019-08-08 22:39:07 +00:00
Ehsan Akhgari 1676b3dd3c Bug 1572258 - Prevent concurrent instances of TemporaryAccessGrantObserver from being created for the same (principal, permission type) pair; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D41115

--HG--
extra : moz-landing-system : lando
2019-08-08 22:00:44 +00:00
Coroiu Cristina 73cc2c909a Backed out changeset b7a4b4f41c3b (bug 1572258) for causing leaks on a CLOSED TREE 2019-08-08 21:41:19 +03:00
Ehsan Akhgari 75723b9e3d Bug 1572258 - Prevent concurrent instances of TemporaryAccessGrantObserver from being created for the same (principal, permission type) pair; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D41115

--HG--
extra : moz-landing-system : lando
2019-08-08 15:17:59 +00:00
Tom Schuster 0e913c22c4 Bug 1558915 - Use infallible nsIURI::SchemeIs in various places r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40677

--HG--
extra : moz-landing-system : lando
2019-08-07 19:49:40 +00:00
Cosmin Sabou c3430326e6 Backed out changeset ca88862d6b63 (bug 1558915) for causing build bustages on StartupCacheUtils. CLOSED TREE 2019-08-07 13:20:32 +03:00
Tom Schuster 8bc1f5ada8 Bug 1558915 - Use infallible nsIURI::SchemeIs in various places r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40677

--HG--
extra : moz-landing-system : lando
2019-08-07 09:36:56 +00:00
Razvan Maries eedbf1137f Backed out changeset b197ca57677a (bug 1558915) for build bustages. CLOSED TREE 2019-08-07 01:04:43 +03:00
Tom Schuster 03c7998ef2 Bug 1558915 - Use infallible nsIURI::SchemeIs in various places r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40677

--HG--
extra : moz-landing-system : lando
2019-08-06 20:19:41 +00:00
Tom Ritter 20c32a0175 Bug 1570738 - Record Telemetry if eval() is used in the Parent Process r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D40332

--HG--
extra : moz-landing-system : lando
2019-08-06 19:56:23 +00:00
Tom Ritter ef67c0b08b Bug 1567623 - Update AssertEvalNotUsingSystemPrincipal and re-enable it r=ckerschb
We now correctly handle the following cases:
 - Thunderbird
 - the Browser Toolbox/Console
 - Two safe and common idioms
 - when general.config.filename is set and userChromeJS does shenanigans

We also change the function to only crash in Debug mode, and for Release channels
we report diagnostic information in a way that does not reveal user data.

Differential Revision: https://phabricator.services.mozilla.com/D39557

--HG--
extra : moz-landing-system : lando
2019-08-01 20:45:01 +00:00
Nicholas Nethercote c27392026e Bug 1570212 - Convert security.all_resource_uri_content_accessible to a static pref. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D40004

--HG--
extra : moz-landing-system : lando
2019-08-01 06:01:40 +00:00
Nicholas Nethercote c0069262ff Bug 1570212 - Convert privacy.firstparty.isolate* prefs to static prefs. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D40001

--HG--
extra : moz-landing-system : lando
2019-08-01 06:00:22 +00:00
Eugen Sawin 532f60a55d Bug 1501108 - [1.7] Add GeckoView Session Context ID support. r=snorp,baku,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D19182

--HG--
extra : moz-landing-system : lando
2019-07-21 17:18:37 +00:00
Tom Ritter 87cbad22ea Bug 1564527 - Enable AssertEvalNotUsingSystemPrincipal on Nightly builds r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D37460

--HG--
extra : moz-landing-system : lando
2019-07-18 18:22:06 +00:00
Sylvestre Ledru e77bfc655d Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D38057

--HG--
extra : moz-landing-system : lando
2019-07-16 07:33:44 +00:00
Boris Zbarsky 5062731c15 Bug 1565688. Remove unused IOService arg from NS_NewURI. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D37968

--HG--
extra : moz-landing-system : lando
2019-07-15 13:39:51 +00:00
Razvan Maries affddc7861 Backed out changeset 6e4d13741a0f (bug 1564527) for perma AddressSanitizer failures. CLOSED TREE 2019-07-13 02:05:25 +03:00
Tom Ritter 0ca0f2dea1 Bug 1564527 - Enable AssertEvalNotUsingSystemPrincipal on Nightly builds r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D37460

--HG--
extra : moz-landing-system : lando
2019-07-11 08:46:18 +00:00
Barret Rennie 7a6747e284 Bug 1289211 - Rename InfallibleTArray to nsTArray in caps/ r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D36938

--HG--
extra : moz-landing-system : lando
2019-07-10 03:24:29 +00:00
Jonathan Kingston 31441f82ea Bug 1560455 - rename CodebasePrincipal to ContentPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D35504

--HG--
extra : moz-landing-system : lando
2019-07-08 16:37:45 +00:00
Victor Porof c24167d198 Bug 1561435 - Format caps/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35897

--HG--
extra : source : d4805a576be19af1130a6b52810d4108c49178d5
2019-07-05 09:58:41 +02:00
Jonathan Kingston 54d34973fd Bug 1547707 - Add in origin attributes to ExpandedPrincipal serialization. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D33613

--HG--
extra : moz-landing-system : lando
2019-06-05 11:27:16 +00:00
Jonathan Kingston 29cb8e9035 Bug 1556747 - Remove UUIDGenerator dependency of NullPrincipalURI.cpp r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D33641

--HG--
extra : moz-landing-system : lando
2019-06-05 12:07:33 +00:00
Boris Zbarsky 9de72a3ac6 Bug 1557793 part 2. Stop using [array] in nsIStringBundle. r=Pike
Differential Revision: https://phabricator.services.mozilla.com/D34196

--HG--
extra : moz-landing-system : lando
2019-06-11 15:51:51 +00:00
Jonathan Kingston a9be4620ee Bug 1508939 - cpp serialization r=ckerschb,mccr8,mikedeboer
Migrating to pure Cpp

Differential Revision: https://phabricator.services.mozilla.com/D29221

--HG--
extra : moz-landing-system : lando
2019-06-03 12:37:12 +00:00
Christoph Kerschbaumer 7cdbee6cd7 Bug 1496418: Update Content Policy checks and allow CSP checks for system principal triggered loads. r=mccr8,baku
Differential Revision: https://phabricator.services.mozilla.com/D32217

--HG--
extra : moz-landing-system : lando
2019-06-03 06:04:25 +00:00
Sylvestre Ledru d57d4905f1 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D30883

--HG--
extra : moz-landing-system : lando
2019-05-25 17:46:15 +00:00
arthur.iakab af8e458c5f Backed out changeset a296439a25ff (bug 1519636) for frequent Windows cppunit failures CLOSED TREE 2019-05-24 14:26:01 +03:00
Sylvestre Ledru c82ea97226 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D30883

--HG--
extra : moz-landing-system : lando
2019-05-24 09:59:17 +00:00
Andrea Marchesini 37d54b0154 Bug 1551056 - Get rid of BasePrincipal::CloneForcingFirstPartyDomain, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D30803

--HG--
extra : moz-landing-system : lando
2019-05-22 22:35:40 +00:00
Christoph Kerschbaumer b633427366 Bug 965637: Move CSP from Principal into Client, part 1: backend changes. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D27654

--HG--
extra : moz-landing-system : lando
2019-05-21 23:14:27 +00:00
Andrew McCreight 2841945140 Bug 1550860 - Mark implicit builtinclass interfaces explicitly. r=nika
If an XPIDL interface has a method or attribute that is [notxpcom],
then it is implicitly treated as [builtinclass], even if it is not
marked as such. For clarity, this patch goes through and marks every
place that relies on this behavior (aside from some test code).

Differential Revision: https://phabricator.services.mozilla.com/D30714

--HG--
extra : moz-landing-system : lando
2019-05-13 19:51:49 +00:00
Andrea Marchesini d179c5015e Bug 1320404 - Remove appId from origin attributes - part 2 - NO_APP_ID UNKNOWN_APP_ID, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D29354

--HG--
extra : moz-landing-system : lando
2019-05-03 17:13:47 +00:00
Andrea Marchesini f8565bf748 Bug 1320404 - Remove appId from origin attributes - part 1 - OriginAttributes and nsIPrincipal, r=Ehsan,flod
Differential Revision: https://phabricator.services.mozilla.com/D29353

--HG--
extra : moz-landing-system : lando
2019-05-03 17:13:17 +00:00
Bogdan Tara 386d23bfe7 Backed out 4 changesets (bug 1320404) for test_permmanager_load_invalid_entries.js failures
Backed out changeset 7c2f4e64d38e (bug 1320404)
Backed out changeset a7e7c0251179 (bug 1320404)
Backed out changeset dd741b25a244 (bug 1320404)
Backed out changeset de9073c57d20 (bug 1320404)
2019-05-03 06:12:25 +03:00
Andrea Marchesini fad9354e10 Bug 1320404 - Remove appId from origin attributes - part 2 - NO_APP_ID UNKNOWN_APP_ID, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D29354

--HG--
extra : moz-landing-system : lando
2019-05-02 17:24:53 +00:00
Andrea Marchesini 138cee6dea Bug 1320404 - Remove appId from origin attributes - part 1 - OriginAttributes and nsIPrincipal, r=Ehsan,flod
Differential Revision: https://phabricator.services.mozilla.com/D29353

--HG--
extra : moz-landing-system : lando
2019-05-02 17:24:51 +00:00
Cosmin Sabou a884fb99d8 Backed out 4 changesets (bug 1320404) for xperf failures on permissions.sqlite-journal.
Backed out changeset fbacf18b6532 (bug 1320404)
Backed out changeset fed7c475d75c (bug 1320404)
Backed out changeset 557b586f774a (bug 1320404)
Backed out changeset 5a20b5f43280 (bug 1320404)
2019-05-02 04:51:18 +03:00
Andrea Marchesini 36718d66c8 Bug 1320404 - Remove appId from origin attributes - part 2 - NO_APP_ID UNKNOWN_APP_ID, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D29354

--HG--
extra : moz-landing-system : lando
2019-05-01 23:21:54 +00:00
Andrea Marchesini 7e61125d8f Bug 1320404 - Remove appId from origin attributes - part 1 - OriginAttributes and nsIPrincipal, r=Ehsan,flod
Differential Revision: https://phabricator.services.mozilla.com/D29353

--HG--
extra : moz-landing-system : lando
2019-05-01 23:21:45 +00:00
Sylvestre Ledru e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

Differential Revision: https://phabricator.services.mozilla.com/D28956

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Sebastian Hengst 3dd01e8232 Backed out 4 changesets (bug 1501108) for causing very frequent leaks in macOS debug wpt tests. a=backout
Backed out changeset 23a77e063257 (bug 1501108)
Backed out changeset 335cec0aacd8 (bug 1501108)
Backed out changeset 99ba286125d1 (bug 1501108)
Backed out changeset 8f2d511ad49f (bug 1501108)

--HG--
extra : rebase_source : 01925c24ac47b37135fcfebab8ae7e9876d5b90e
2019-04-29 17:39:42 +02:00
Sylvestre Ledru a1dce6440a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D28329

--HG--
extra : moz-landing-system : lando
2019-04-22 16:35:03 +00:00
Andrew McCreight f242e71c8a Bug 1545822 - Clean up some whitespace in XPIDL files. r=froydnj
The attributes for an interface should be on the line right before the
interface.

Interface attributes should be separated by spaces.

Clean up some trailing whitespace in widget/.

Differential Revision: https://phabricator.services.mozilla.com/D28234

--HG--
extra : moz-landing-system : lando
2019-04-21 01:47:00 +00:00