Commit graph

198 commits

Author SHA1 Message Date
Tom Ritter
e26694557f Bug 1894958: Let's name this page more accurately r=timhuang
The purpose of this page is to improve the fingerprinting protections
in Firefox.

Differential Revision: https://phabricator.services.mozilla.com/D209599
2024-06-04 20:02:26 +00:00
Iulian Moraru
53f0987855 Backed out changeset 98ca2e132b06 (bug 1895935) for causing multiple failures. CLOSED TREE 2024-05-20 19:38:29 +03:00
Tom Ritter
bd594eaa79 Bug 1895935: Enable eval telemetry on mobile, crash in debug builds, but do not block in any channel r=freddyb,geckoview-reviewers,tthibaud
Differential Revision: https://phabricator.services.mozilla.com/D209939
2024-05-20 15:09:25 +00:00
Sebastian Hengst
201a874643 Backed out changeset 20b5e4b2f448 (bug 1877195) for breaking HTTP downloads (bug 1892069) 2024-04-18 17:20:00 +02:00
Emilio Cobos Álvarez
e4ddf24147 Bug 1887719 - More consistently use UTF8String/nsCString for URLs. r=necko-reviewers,webidl,anti-tracking-reviewers,places-reviewers,jari,kershaw,janv,smaug,hsivonen
Sorry for the massive patch but I found it hard to split without
introducing a bunch of copies around...

This mostly makes necko and DOM agree on which strings to use, which
should result on less copies and conversions.

Differential Revision: https://phabricator.services.mozilla.com/D205601
2024-04-04 11:49:57 +00:00
Tom Ritter
c816dcfce3 Bug 1882422: Use a local testing page to return complex data and make use of it in C++-land r=peterv
- Create a local page we will access via an about: URL
- In that page, demonstrate how to do some stuff, then fire a custom event
  indicating its stuff is done _and_ return complex data in that event.
  console.log() didn't seem to be visible in the HiddenWindow, so I also
  piped out debug strings for development purposes, so they can be
  console.logged in the Service, where we can see them.
- Instead of listening for DOMContentLoaded/pageshow, instead listen for
  the new CustomEvent.
- In UserCharacteristicsPageService, receive the data from the page and
  populate the appropriate Glean metrics
- Refactor the calling of nsUserCharacteristics::PopulateData() and
  SubmitPing().  Now we call PopulateDataAndEventuallySubmit() which will
  eventually call SubmitPing after our promise is resolved.
- To make it a little cleaner (so ContentPageStuff() isn't calling
  SubmitPing()) we return the promise out of ContentPageStuff() that
  PopulateDataAndEventuallySubmit() will await and then call SubmitPing()
  when that promise resolves

Differential Revision: https://phabricator.services.mozilla.com/D203055
2024-04-03 23:43:17 +00:00
Christoph Kerschbaumer
239cad0ecb Bug 1877195: Expand mixed-content download protection to all http downloads, r=freddyb,Gijs,anti-tracking-reviewers,pbz
Differential Revision: https://phabricator.services.mozilla.com/D200267
2024-03-04 15:18:23 +00:00
Cosmin Sabou
2dde24b573 Backed out changeset a89ec49d7645 (bug 1877195) for causing wpt failures on iframe_sandbox_window_open_download_allow_downloads. CLOSED TREE 2024-03-04 16:24:27 +02:00
Christoph Kerschbaumer
42efa58063 Bug 1877195: Expand mixed-content download protection to all http downloads, r=freddyb,Gijs,anti-tracking-reviewers,pbz
Differential Revision: https://phabricator.services.mozilla.com/D200267
2024-03-04 10:03:18 +00:00
Iulian Moraru
ac062aeb95 Backed out changeset 81bb704a27a1 (bug 1877195) for causing wpt failures on iframe_sandbox_navigation_download_allow_downloads.sub.tentative.html. CLOSED TREE 2024-03-01 18:46:45 +02:00
Christoph Kerschbaumer
6222503141 Bug 1877195: Expand mixed-content download protection to all http downloads, r=freddyb,Gijs,anti-tracking-reviewers,pbz
Differential Revision: https://phabricator.services.mozilla.com/D200267
2024-03-01 13:04:39 +00:00
Bojidar Marinov
c7286a75c7 Bug 1839845 - Add about:settings as alias of about:preferences. r=Gijs,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D202594
2024-02-29 10:09:58 +00:00
Nick Alexander
8367663cef Bug 1878784 - Allow about:asrouter to use script-src. r=ckerschb,mconley
There are three exceptions made for `about:newtab`; this updates the
first exception.  It does not appear that the `about:asrouter` CSP
includes a web scheme, so the second exception in the file is not
needed; nor does it appear that `about:asrouter` require
`unsafe-inline`, so the third exception in the file is not needed.

Differential Revision: https://phabricator.services.mozilla.com/D200733
2024-02-06 14:04:27 +00:00
Tooru Fujisawa
ac9978df07 Bug 1878457 - Part 1: ESMify performance-new modules. r=julienw,profiler-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D200558
2024-02-05 23:23:32 +00:00
Tom Schuster
e56053abff Bug 1397308 - Implement CSP 'Is element nonceable?' check. r=emilio,hsivonen,freddyb
Differential Revision: https://phabricator.services.mozilla.com/D198150
2024-01-26 14:56:32 +00:00
Tom Schuster
346cecd51c Bug 1872839 - Remove aMimeTypeGuess parameter from nsIContentPolicy. r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D197794
2024-01-08 15:47:42 +00:00
Tooru Fujisawa
21b872e484 Bug 1864168 - Part 2: Use 1-origin column number in nsJSUtils::GetCallingLocation. r=smaug,anti-tracking-reviewers,devtools-reviewers,ochameau,pbz
nsJSUtils::GetCallingLocation is used mostly for console message and logging,
except for the following:
  * profiler label in TimeoutHandler
  * CC log for TimeoutHandler
  * events in nsIConsoleAPIStorage
  * JSON used by mozilla::dom::SendReports

Differential Revision: https://phabricator.services.mozilla.com/D193370
2023-11-22 12:31:31 +00:00
Tooru Fujisawa
8c59289f4f Bug 1864168 - Part 1: Use 1-origin column number in nsIContentSecurityPolicy. r=smaug,devtools-reviewers,ochameau,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D193369
2023-11-22 12:31:30 +00:00
Natalia Csoregi
705aa81869 Backed out 14 changesets (bug 1865005, bug 1864168, bug 1864155, bug 1862814, bug 1862693) for causing bustage on nsRFPService.cpp. CLOSED TREE
Backed out changeset a4f3e7625abf (bug 1865005)
Backed out changeset ab38141e470b (bug 1862814)
Backed out changeset a679b50dc4a9 (bug 1862814)
Backed out changeset e340886ce62a (bug 1862814)
Backed out changeset 1378502e64b0 (bug 1862814)
Backed out changeset 8ee94e5e79c2 (bug 1862814)
Backed out changeset 6d4ef1cdfabb (bug 1864168)
Backed out changeset 2c30c4d757fc (bug 1864168)
Backed out changeset d4db9576559b (bug 1864168)
Backed out changeset 8ffec0d83028 (bug 1864168)
Backed out changeset fa77d852b494 (bug 1864168)
Backed out changeset f6646771a26a (bug 1864168)
Backed out changeset 7bd0ff6986df (bug 1864155)
Backed out changeset 39867b503289 (bug 1862693)
2023-11-22 14:01:55 +02:00
Tooru Fujisawa
836828bbf3 Bug 1864168 - Part 2: Use 1-origin column number in nsJSUtils::GetCallingLocation. r=smaug,anti-tracking-reviewers,devtools-reviewers,ochameau,pbz
nsJSUtils::GetCallingLocation is used mostly for console message and logging,
except for the following:
  * profiler label in TimeoutHandler
  * CC log for TimeoutHandler
  * events in nsIConsoleAPIStorage
  * JSON used by mozilla::dom::SendReports

Differential Revision: https://phabricator.services.mozilla.com/D193370
2023-11-22 11:13:54 +00:00
Tooru Fujisawa
a4a513ad86 Bug 1864168 - Part 1: Use 1-origin column number in nsIContentSecurityPolicy. r=smaug,devtools-reviewers,ochameau,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D193369
2023-11-22 11:13:54 +00:00
Tom Ritter
2e7359a8cb Bug 1840892: Expand the potential crashing behavior to Early Beta as well r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D190989
2023-10-16 13:36:49 +00:00
Tom Ritter
1f739d1ac3 Bug 1845782: Observe important pref changes for JS hack detection r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D184757
2023-08-04 15:03:46 +00:00
renevietnam29@gmail.com
bd2633f734 Bug 1842971 removed dom.block_download_in_sandboxed_iframes r=emilio
There we go

Differential Revision: https://phabricator.services.mozilla.com/D184241
2023-07-24 12:13:49 +00:00
Tom Ritter
3219133487 Bug 1840871: For DetectJSHacks - in subprocesses, only see if the pref has a value r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D182362
2023-07-13 14:09:17 +00:00
Malte Juergens
1628479f77 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
f94e576acf 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
58de75b2da 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
e58eb0f58e 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
f66c3665b0 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
f703486de7 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
de94ccb4e0 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
a525f604ba 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
00d5a50ae8 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
2d217d3622 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
9b9ee3e060 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
026c841ffb 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
24210e2c3a 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
c15823d075 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
ce9229caa5 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
c6b2c5db61 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
b3c13bf114 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
3d0e3d5413 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
72a594ec98 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
f41fbce75e 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
afd75e5813 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
2e264dae56 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
82ca8925d2 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
3c73cef179 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
07a2e2d095 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