Commit Graph

173 Commits

Author SHA1 Message Date
Malte Juergens
59b98aca85 Bug 1674859: Disable HTTPS-Only for "Save-As" Downloads r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D182781
2023-07-12 11:17:46 +00:00
sunil mayya
eecb4af4f2 Bug 1629307 - prevent auth prompts (status 401) if XFO checks fails. r=necko-reviewers,valentin,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D156292
2023-02-15 17:27:46 +00:00
Julien Wajsberg
0195212451 Bug 1811853 - Move symbolication files to the shared/ directory r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D167846
2023-02-13 16:46:38 +00:00
edgul
042d0ee41c Bug 1809151 - corporate web proxy no kerberos auth for iframe content by backout 1629307 r=necko-reviewers,valentin,jesup
backing out rev-id: 5f5c6f101a19

Differential Revision: https://phabricator.services.mozilla.com/D167691
2023-01-25 19:44:11 +00:00
Tom Schuster
854baa9623 Bug 1645745 - Suppress CSP parser errors/warnings in certain cases. r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D163815
2022-12-19 11:52:45 +00:00
Olli Pettay
03ec229527 Bug 1801063 - DOMParser.parseFromString() on about:welcome causes AssertAboutPageHasCSP, r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D163026
2022-11-25 09:42:06 +00:00
sunil mayya
369c2f68f9 Bug 1629307 - prevent auth prompts if XFO checks fails. r=necko-reviewers,valentin,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D156292
2022-11-08 12:40:57 +00:00
Nika Layzell
bf15ab74e6 Bug 1693271 - Part 1: Use RustRegex for MatchGlob, r=kmag
This also involves making MatchGlob operate on UTF8String instead of DOMString,
as the rust `regex` crate operates on utf-8 strings. This should have no
functional impact on callers.

Differential Revision: https://phabricator.services.mozilla.com/D158877
2022-10-13 21:46:57 +00:00
Cristian Tuns
8d27a1d79c Backed out 15 changesets (bug 1794001, bug 1793995, bug 1693271) for causing build bustages CLOSED TREE
Backed out changeset 5d4b0c23342f (bug 1793995)
Backed out changeset 79a5023e7822 (bug 1793995)
Backed out changeset 4330821df43f (bug 1793995)
Backed out changeset a653699a5cef (bug 1793995)
Backed out changeset 264a0154514e (bug 1793995)
Backed out changeset 6773cada61a8 (bug 1793995)
Backed out changeset d55a78f3627a (bug 1793995)
Backed out changeset 16299839e25e (bug 1793995)
Backed out changeset 10c5cf69b3f0 (bug 1693271)
Backed out changeset 84e7bf515c94 (bug 1693271)
Backed out changeset b8dbabe61a9a (bug 1794001)
Backed out changeset 3cfe4087793d (bug 1794001)
Backed out changeset dd03b0396eb9 (bug 1794001)
Backed out changeset d4f9b4a3029a (bug 1794001)
Backed out changeset 148d136ce549 (bug 1794001)
2022-10-12 22:12:26 -04:00
Nika Layzell
72b377b1c7 Bug 1693271 - Part 1: Use RustRegex for MatchGlob, r=kmag
This also involves making MatchGlob operate on UTF8String instead of DOMString,
as the rust `regex` crate operates on utf-8 strings. This should have no
functional impact on callers.

Differential Revision: https://phabricator.services.mozilla.com/D158877
2022-10-12 23:57:21 +00:00
Cristian Tuns
d6fbf59d81 Backed out 15 changesets (bug 1794001, bug 1693271, bug 1793995) for causing build bustages on RustRegex.h CLOSED TREE
Backed out changeset 93fa076646e1 (bug 1793995)
Backed out changeset 3deec78af656 (bug 1793995)
Backed out changeset 61d74f2cf5cf (bug 1793995)
Backed out changeset 8484584cc787 (bug 1793995)
Backed out changeset f7d78fffc836 (bug 1793995)
Backed out changeset 37ccdfa60f9a (bug 1793995)
Backed out changeset 06d7d4823419 (bug 1793995)
Backed out changeset 5cb4daddadb9 (bug 1793995)
Backed out changeset 8b71c15f24c7 (bug 1693271)
Backed out changeset 77c06db920fe (bug 1693271)
Backed out changeset e286fb05d64f (bug 1794001)
Backed out changeset ea8ba9ce54c8 (bug 1794001)
Backed out changeset 27715593ce6f (bug 1794001)
Backed out changeset d1030c02b560 (bug 1794001)
Backed out changeset 80b01e63ca54 (bug 1794001)
2022-10-12 12:57:05 -04:00
Nika Layzell
9b90ca6ec6 Bug 1693271 - Part 1: Use RustRegex for MatchGlob, r=kmag
This also involves making MatchGlob operate on UTF8String instead of DOMString,
as the rust `regex` crate operates on utf-8 strings. This should have no
functional impact on callers.

Differential Revision: https://phabricator.services.mozilla.com/D158877
2022-10-12 15:39:52 +00:00
John Bieling
a6dab7ec72 Bug 1764698 - Move LanguageDetector.jsm and related files to toolkit. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D151606
2022-08-23 05:59:55 +00:00
Nika Layzell
63a28ee824 Bug 1772006 - Part 5: Simplify and move the string searching APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,eeejay,dragana,barret
The biggest set of APIs from ns[T]StringObsolete which are still heavily used
are the string searching APIs. It appears the intention was for these to be
replaced by the `FindInReadable` APIs, however that doesn't appear to have
happened.

In addition, the APIs have some quirks around their handling of mixed character
widths. These APIs generally supported both narrow strings and the native
string type, probably because char16_t string literals weren't available until
c++11. Finally they also used easy-to-confuse unlabeled boolean and integer
optional arguments to control behaviour.

These patches do the following major changes to the searching APIs:

1. The ASCII case-insensitive search method was split out as
   LowerCaseFindASCII, rather than using a boolean. This should be less
   error-prone and more explicit, and allows the method to continue to use
   narrow string literals for all string types (as only ASCII is supported).
2. The other [R]Find methods were restricted to only support arguments with
   matching character types. I considered adding a FindASCII method which would
   use narrow string literals for both wide and narrow strings but it would've
   been the same amount of work as changing all of the literals to unicode
   literals.
   This ends up being the bulk of the changes in the patch.
3. All find methods were re-implemented using std::basic_string_view's find
   algorithm or stl algorithms to reduce code complexity, and avoid the need to
   carry around the logic from nsStringObsolete.cpp.
4. The implementations were moved to nsTStringRepr.cpp.
5. An overload of Find was added to try to catch callers which previously
   called `Find(..., false)` or `Find(..., true)` to set case-sensitivity, due
   to booleans normally implicitly coercing to `index_type`. This should
   probably be removed at some point, but may be useful during the transition.

Differential Revision: https://phabricator.services.mozilla.com/D148300
2022-07-30 00:12:48 +00:00
Julien Wajsberg
31b254f63b Bug 1777479 - Put the profiler's symbolication jsm in the eval check allow list r=tjr
Indeed the profiler's symbolication jsm uses a dynamically loaded wasm
file to unpack symbols from binary object files.

Differential Revision: https://phabricator.services.mozilla.com/D150964
2022-07-04 15:30:32 +00:00
criss
c1b045ddda Backed out 9 changesets (bug 1772006) causing build bustages on nsTString.cpp. CLOSED TREE
Backed out changeset f17c7565707b (bug 1772006)
Backed out changeset c725fe1f5882 (bug 1772006)
Backed out changeset d19663161261 (bug 1772006)
Backed out changeset b6611ab002d9 (bug 1772006)
Backed out changeset 790f42b64af9 (bug 1772006)
Backed out changeset 79a734b4e4d9 (bug 1772006)
Backed out changeset 42730aae16ea (bug 1772006)
Backed out changeset b2542aef3054 (bug 1772006)
Backed out changeset 962bfea4a309 (bug 1772006)
2022-06-11 01:13:42 +03:00
Nika Layzell
c1e4a1e52c Bug 1772006 - Part 6: Simplify and move the string searching APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,eeejay,dragana,barret
The biggest set of APIs from ns[T]StringObsolete which are still heavily used
are the string searching APIs. It appears the intention was for these to be
replaced by the `FindInReadable` APIs, however that doesn't appear to have
happened.

In addition, the APIs have some quirks around their handling of mixed character
widths. These APIs generally supported both narrow strings and the native
string type, probably because char16_t string literals weren't available until
c++11. Finally they also used easy-to-confuse unlabeled boolean and integer
optional arguments to control behaviour.

These patches do the following major changes to the searching APIs:

1. The ASCII case-insensitive search method was split out as
   LowerCaseFindASCII, rather than using a boolean. This should be less
   error-prone and more explicit, and allows the method to continue to use
   narrow string literals for all string types (as only ASCII is supported).
2. The other [R]Find methods were restricted to only support arguments with
   matching character types. I considered adding a FindASCII method which would
   use narrow string literals for both wide and narrow strings but it would've
   been the same amount of work as changing all of the literals to unicode
   literals.
   This ends up being the bulk of the changes in the patch.
3. All find methods were re-implemented using std::basic_string_view's find
   algorithm or stl algorithms to reduce code complexity, and avoid the need to
   carry around the logic from nsStringObsolete.cpp.
4. The implementations were moved to nsTStringRepr.cpp.
5. An overload of Find was added to try to catch callers which previously
   called `Find(..., false)` or `Find(..., true)` to set case-sensitivity, due
   to booleans normally implicitly coercing to `index_type`. This should
   probably be removed at some point, but may be useful during the transition.

Differential Revision: https://phabricator.services.mozilla.com/D148300
2022-06-10 21:12:08 +00:00
Kagami Sascha Rosylight
4d68f1d57d Bug 1769290 - Part 10: Apply mozilla-js-handle-rooted-typedef against remaining dom directories r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148283
2022-06-05 20:55:00 +00:00
Tom Ritter
0862794af3 Bug 1763943: Do not bust on the debugger filename in the Browser Console r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D145452
2022-05-04 15:01:22 +00:00
Tooru Fujisawa
aab905e211 Bug 1765167 - Part 4: Stop using Cu.import in dom/. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D144097
2022-05-03 06:32:30 +00:00
Tom Ritter
35eb5d9915 Bug 1766323: If the preference service is not initialized; don't say we checked hacks r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D145113
2022-04-29 19:01:22 +00:00
Barret Rennie
b31f8b8a22 Bug 1762493 - Remove Ajv r=ckerschb,ahal
Differential Revision: https://phabricator.services.mozilla.com/D142881
2022-04-20 15:23:28 +00:00
Jonathan Watt
c9f14e24cd Bug 1757657. Remove some about:printpreview cruft that was missed in 1702501. r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D139993
2022-04-04 17:19:24 +00:00
Tom Ritter
d6b20f9947 Bug 1759887: Check both preference branches for values r=freddyb
This fixes a known problem where the default branch contains a
value for general.config.filename but the user branch
does not, resultnig in a Telemetry event for prefcalls.js to
be created.

However I don't think resolves all issues.

Differential Revision: https://phabricator.services.mozilla.com/D141677
2022-03-22 19:02:48 +00:00
Scott
52aad4c16a Bug 1746016 - Save to Pocket refresh home panel. r=gvn,fluent-reviewers,mconley,andreio,flod,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D137708
2022-02-23 21:12:49 +00:00
Tom Ritter
f1cc7dbdd7 Bug 1755003: Disable JS Load Restrictions if two more admin prefs are set r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D138546
2022-02-14 14:33:15 +00:00
Tom Ritter
d4ee99c0ba Bug 1748870 - Do not leave a pending JS Exception on the stack r=mgaudet
In 1746231 the JS Exception stuff was moved from the
callback call site into the callback itself.
However, when it was moved, an exception could be
added even if we were going to permit the script
execution.  This is wrong.

Move the exception stuff back to the callback site
and use the result of the callback to determine if
we add anything to the stack or not

Differential Revision: https://phabricator.services.mozilla.com/D135250
2022-01-11 19:16:38 +00:00
Tom Ritter
25837b8df2 Bug 1742645: Enforce javascript filename restrictions in Debug and Nightly builds r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D131947
2022-01-10 18:58:00 +00:00
Tom Ritter
d98a72ab05 Bug 1746231: Permit any script from privileged extensions, not just allowlisted r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D133931
2021-12-21 20:40:33 +00:00
Tom Ritter
04e4d47fc4 Bug 1746231: Convert the script callback to take a JSContext instead of a system bool r=freddyb,iain
Differential Revision: https://phabricator.services.mozilla.com/D133930
2021-12-21 20:40:33 +00:00
Rob Wu
266cac53be Bug 1745566 - Support frame-ancestors for web-accessible extension resources r=necko-reviewers,freddyb,dragana
frame-ancestor support requires a CSP. While extensions can declare a
CSP for extension pages, the frame-ancestors directive was not enforced
because the implementation expected only HTTP channels.

This patch also adds support for channels from ExtensionProtocolHandler.

Differential Revision: https://phabricator.services.mozilla.com/D134143
2021-12-21 20:34:28 +00:00
Butkovits Atila
54519094f9 Backed out 2 changesets (bug 1746231) for causing SM bustages at BytecodeCompiler.cpp. CLOSED TREE
Backed out changeset 8c6e70fe2e4e (bug 1746231)
Backed out changeset f3524f0b660b (bug 1746231)
2021-12-21 19:32:06 +02:00
Tom Ritter
2cbbf90d3d Bug 1746231: Permit any script from privileged extensions, not just allowlisted r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D133931
2021-12-21 16:56:04 +00:00
Tom Ritter
76c920bd20 Bug 1746231: Convert the script callback to take a JSContext instead of a system bool r=freddyb,iain
Differential Revision: https://phabricator.services.mozilla.com/D133930
2021-12-21 16:56:04 +00:00
Tom Ritter
e8b67fd9dd Bug 1744118: Fix the JS Load and System Principal Telemetry r=ckerschb
If the string pref is not set, then pref lookup fails. If the lookup
fails, we interpret it as an error (rather than a missing pref) and
bail early.

This means that we never set sJSHacksChecked and no telemetry will be
sent because we permit everything.  (It also means we do a ton of pref
lookups all the time because every one of them fails.)

Differential Revision: https://phabricator.services.mozilla.com/D132727
2021-12-03 07:42:26 +00:00
Tom Ritter
119717772b Bug 1737295 - Improve exemption matching and handling of off-main-thread reports r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D129276
2021-10-22 18:38:13 +00:00
Andrei Oprea
52681e1e34 Bug 1730924 - Upgrade ajv.js from 4.1.1 to 6.12.6 r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D127625
2021-10-12 19:41:05 +00:00
Alexandru Michis
b0d4c86fd7 Backed out changeset 837ba61b9975 (bug 1730924) for causing xpcshell failures in services/sync.
CLOSED TREE
2021-10-12 20:13:05 +03:00
Andrei Oprea
256aaa4763 Bug 1730924 - Upgrade ajv.js from 4.1.1 to 6.12.6 r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D127625
2021-10-12 14:43:02 +00:00
Frederik Braun
d20125ef18 Bug 1731025 - systemprincipal telemetry for userChrome.css profiles (and avoid racing with pref checks) r=ckerschb,tjr
Differential Revision: https://phabricator.services.mozilla.com/D125804
2021-10-04 11:09:15 +00:00
Tom Ritter
f11a7d598b Bug 1729969: Exempt all Privileged Extensions from script filename validation r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D126133
2021-09-27 15:42:46 +00:00
Tom Ritter
b122b5987c Bug 1729969: Refactor how and when we collect about: and moz-extension data r=freddyb
Previously we would only include about: and moz-extension details
on Windows, because I erroneously thought that was the only place
we could sanitize them properly. But these types of URLs aren't
hard to sanitize, and really it's file:// URIs that are hard, and
those will stay windows only.

So now we collect about: and moz-extension: URIs on all platforms
and we additionally include whether the extension is privileged
or not.

We put them under new keys also.

Differential Revision: https://phabricator.services.mozilla.com/D126132
2021-09-27 15:42:46 +00:00
Tom Ritter
bb3cb3598f Bug 1729969: Refactor 'extension' Filetype Reporting r=freddyb
The regex will only match file:// URIs, so make that more
explicit in the documentation and code.

Depends on D125113

Differential Revision: https://phabricator.services.mozilla.com/D126131
2021-09-27 15:42:45 +00:00
Tom Ritter
cfc2e91989 Bug 1729969: Improve race checking and add an exemption for about:preferences r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D125113
2021-09-27 15:42:45 +00:00
criss
d0d5e6c8a7 Backed out changeset 60edafe5dcc3 (bug 1731025) for causing failures on ServoUtils.h:33 and browser_preferences_usage.js. CLOSED TREE 2021-09-20 14:19:48 +03:00
Frederik Braun
0c0f04dbcb Bug 1731025 - systemprincipal telemetry for userChrome.css profiles (and avoid racing with pref checks) r=ckerschb,tjr
Differential Revision: https://phabricator.services.mozilla.com/D125804
2021-09-20 08:58:55 +00:00
Tom Ritter
24d3d29b72 Bug 1727803: Create security exemptions for about:sync and about:downloads r=freddyb
This will also fix Bug 1727770

Differential Revision: https://phabricator.services.mozilla.com/D123790
2021-08-30 14:14:07 +00:00
Tom Ritter
44c38fe7e5 Bug 1727842: Do not crash if off the main thread. r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D123866
2021-08-30 14:13:35 +00:00
Tom Ritter
f67673cd5c Bug 1727914: Fix fuzzing build caused by paren error r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D123856
2021-08-27 14:53:17 +00:00
Andi-Bogdan Postelnicu
52bd17d164 Bug 1725145 - fixes in dom for win in non unified env. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D123544
2021-08-25 10:46:15 +00:00