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

42 Коммитов

Автор SHA1 Сообщение Дата
Sebastian Streich 27e2164c57 Bug 1656296 - Pass Blocked Downloads to the DownloadsUI r=ckerschb,Gijs
***

***
Added Better Testing

Differential Revision: https://phabricator.services.mozilla.com/D85439
2020-08-24 15:29:23 +00:00
Cosmin Sabou 05ab468b46 Backed out changeset 388c153da388 (bug 1656296) for causing default process leaks. CLOSED TREE 2020-08-19 21:58:03 +03:00
Sebastian Streich b578e23a52 Bug 1656296 - Pass Blocked Downloads to the DownloadsUI r=ckerschb,Gijs
***

***
Added Better Testing

Differential Revision: https://phabricator.services.mozilla.com/D85439
2020-08-19 17:58:57 +00:00
Narcis Beleuzu 0e759593c7 Backed out changeset 1b7eb33c8ec9 (bug 1656296) for bc failure on browser_test_mixed_content_download.js . CLOSED TREE 2020-08-19 16:39:33 +03:00
Sebastian Streich a797186639 Bug 1656296 - Pass Blocked Downloads to the DownloadsUI r=ckerschb,Gijs
***

***
Added Better Testing

Differential Revision: https://phabricator.services.mozilla.com/D85439
2020-08-19 12:45:55 +00:00
Sebastian Streich 9644a40740 Bug 1558394 - Block downloads in sandboxed iframes r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D67351
2020-07-29 11:50:09 +00:00
Sebastian Streich 8ccf28a8ba Bug 1614969 - Check download with MixedContentBlocker r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73302
2020-07-08 15:25:43 +00:00
Butkovits Atila e6f3141f9a Backed out changeset 2df0c2a2f866 (bug 1614969) for asertion failure on base/LoadInfo.cpp. 2020-06-30 21:47:17 +03:00
Sebastian Streich 5bb89780fa Bug 1614969 - Check download with MixedContentBlocker r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73302
2020-06-30 16:29:22 +00:00
Razvan Maries c54f50f342 Backed out changeset a10fc7b299ff (bug 1614969) for build bustages on nsContentSecurityUtils.cpp. CLOSED TREE 2020-06-24 13:23:02 +03:00
Sebastian Streich a9516ee4f5 Bug 1614969 - Check download with MixedContentBlocker r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73302
2020-06-24 09:54:50 +00:00
Butkovits Atila c112069ef0 Backed out changeset 3685f83e0dc0 (bug 1614969) as requested by dev. 2020-06-23 15:22:21 +03:00
Sebastian Streich d8ff61ded5 Bug 1614969 - Check download with MixedContentBlocker r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73302
2020-06-23 11:30:28 +00:00
Christoph Kerschbaumer 6ae4ad1947 Bug 1422284 - Upgrade insecure requests should only apply to top-level same-origin redirects. r=baku,valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D75259
2020-05-25 08:14:10 +00:00
Christoph Kerschbaumer 1201f87e94 Bug 1599131: Remove carve outs for downloads within x-frame-options when fission enabled. r=smaug,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D65949

--HG--
extra : moz-landing-system : lando
2020-04-14 05:57:44 +00:00
Chris Fronk d5b004443b Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511

--HG--
rename : mfbt/Pair.h => mfbt/CompactPair.h
extra : moz-landing-system : lando
2020-03-17 12:42:12 +00:00
Mihai Alexandru Michis bc46756805 Backed out changeset 93abc56ef420 (bug 1599131) for causing failures in frame-ancestors-from-serviceworker.https.html 2020-03-13 18:23:15 +02:00
Christoph Kerschbaumer 5ea63e55c7 Bug 1599131: Remove carve outs for downloads within x-frame-options when fission enabled. r=smaug,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D65949

--HG--
extra : moz-landing-system : lando
2020-03-13 14:20:20 +00:00
shindli b02b3a6e1a Backed out changeset a08637fb30c8 (bug 1143478) for causing bustages in /builds/worker/checkouts/gecko/ipc/mscom/Registration.cpp CLOSED TREE
--HG--
rename : mfbt/CompactPair.h => mfbt/Pair.h
2020-03-11 14:30:54 +02:00
Chris Fronk a27e438c2d Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511

--HG--
rename : mfbt/Pair.h => mfbt/CompactPair.h
extra : moz-landing-system : lando
2020-03-11 12:18:13 +00:00
Tom Ritter 265c831dd7 Bug 1608970 - Record the addon name, id, and filepath of javascript files loaded into the parent process r=mixedpuppy,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D60186

--HG--
extra : moz-landing-system : lando
2020-02-26 18:01:28 +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
Tom Ritter c613c0090b Bug 1582512 - Record a Telemetry Event if we receive a request to load a script filename we aren't expecting r=chutten
While we're here, we also extend the collection period for evalUsage, as it is taking longer to deploy than expected.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 17:27:16 +00:00
Tom Ritter caf0cf4f3a Bug 1582512 - Rename FilenameToEvalType to FilenameToFilenameType r=Gijs,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D53232

--HG--
extra : moz-landing-system : lando
2019-12-02 17:27:05 +00:00
Tom Ritter f0e4f705a7 Bug 1582512 - Rename FilenameType to FilenameTypeAndDetails r=Gijs,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D53231

--HG--
extra : moz-landing-system : lando
2019-12-02 17:27:07 +00:00
Tom Ritter 4f9313ba4e Bug 1582512 - Register a ScriptValidationCallback to examine script loads in the parent process r=Gijs,ckerschb
Additionally, we disable validation on PAC scripts.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 17:27:09 +00:00
Ciure Andrei e473bd5f57 Backed out 10 changesets (bug 1582512) for causing browser_preferences_usage.js to permafail CLOSED TREE
Backed out changeset a615a2c07523 (bug 1582512)
Backed out changeset 7dd0266da0a1 (bug 1582512)
Backed out changeset dfdefc6ede97 (bug 1582512)
Backed out changeset 59db30e1915f (bug 1582512)
Backed out changeset 1eb6f6b02149 (bug 1582512)
Backed out changeset 391ed11326fb (bug 1582512)
Backed out changeset 02865605c1c3 (bug 1582512)
Backed out changeset 017582048986 (bug 1582512)
Backed out changeset 1374c08302f9 (bug 1582512)
Backed out changeset 40dd63b6910a (bug 1582512)
2019-12-02 19:23:12 +02:00
Tom Ritter f6c094fcf4 Bug 1582512 - Record a Telemetry Event if we receive a request to load a script filename we aren't expecting r=chutten
While we're here, we also extend the collection period for evalUsage, as it is taking longer to deploy than expected.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 15:45:37 +00:00
Tom Ritter 8660e8abe3 Bug 1582512 - Rename FilenameToEvalType to FilenameToFilenameType r=Gijs,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D53232

--HG--
extra : moz-landing-system : lando
2019-12-02 15:45:27 +00:00
Tom Ritter 629dcba076 Bug 1582512 - Rename FilenameType to FilenameTypeAndDetails r=Gijs,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D53231

--HG--
extra : moz-landing-system : lando
2019-12-02 15:45:20 +00:00
Tom Ritter 40826aaf6c Bug 1582512 - Register a ScriptValidationCallback to examine script loads in the parent process r=Gijs,ckerschb
Additionally, we disable validation on PAC scripts.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 15:45:13 +00:00
Cosmin Sabou be84eb7037 Backed out 11 changesets (bug 1582512) for causing valgrind bustages.
Backed out changeset 8b850fd66bf5 (bug 1582512)
Backed out changeset 07d3631e609a (bug 1582512)
Backed out changeset fa91b085eb59 (bug 1582512)
Backed out changeset 232d5735d404 (bug 1582512)
Backed out changeset 47045fa2ffd2 (bug 1582512)
Backed out changeset 40a0f6c6cd61 (bug 1582512)
Backed out changeset 5fb3e489c31f (bug 1582512)
Backed out changeset 379318a35b20 (bug 1582512)
Backed out changeset bf81985c33b7 (bug 1582512)
Backed out changeset 1e0dd57b8041 (bug 1582512)
Backed out changeset 2787043f1fab (bug 1582512)
2019-11-20 18:44:45 +02:00
Tom Ritter 52b85ecf29 Bug 1582512 - Record a Telemetry Event if we receive a request to load a script filename we aren't expecting r=chutten
While we're here, we also extend the collection period for evalUsage, as it is taking longer to deploy than expected.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 16:10:51 +00:00
Tom Ritter 7ce42ac1ac Bug 1582512 - Rename FilenameToEvalType to FilenameToFilenameType r=Gijs,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D53232

--HG--
extra : moz-landing-system : lando
2019-11-18 20:44:56 +00:00
Tom Ritter 035192e513 Bug 1582512 - Rename FilenameType to FilenameTypeAndDetails r=Gijs,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D53231

--HG--
extra : moz-landing-system : lando
2019-11-18 20:44:48 +00:00
Tom Ritter e7037fe85f Bug 1582512 - Register a ScriptValidationCallback to examine script loads in the parent process r=Gijs,ckerschb
Additionally, we disable validation on PAC scripts.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 13:04:00 +00:00
Christoph Kerschbaumer a9ab8a0285 Bug 1590784: Move GetHttpChannelHelper into nsContentSecurityUtils. r=jkt
Differential Revision: https://phabricator.services.mozilla.com/D50238

--HG--
extra : moz-landing-system : lando
2019-10-23 15:17:21 +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
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
Christoph Kerschbaumer 507cd448aa Bug 1566386: Assert that every about: page on Android ships with a CSP. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D45193

--HG--
extra : moz-landing-system : lando
2019-09-10 06:26:14 +00:00
Christoph Kerschbaumer f5df74c740 Bug 1573145: Create ContentSecurityUtils.h/cpp and move AssertAboutPageHasCSP into it. r=jkt
Differential Revision: https://phabricator.services.mozilla.com/D41537

--HG--
extra : moz-landing-system : lando
2019-08-14 10:15:09 +00:00