Commit Graph

1843 Commits

Author SHA1 Message Date
Tooru Fujisawa
eda08a4a05 Bug 1667455 - Part 6: Stop importing Services.jsm from chrome-priv JS code, non-top-level or multi-line cases. r=kmag,perftest-reviewers,AlexandruIonescu,sparky
Differential Revision: https://phabricator.services.mozilla.com/D150895
2022-07-11 12:41:51 +00:00
Tooru Fujisawa
48c568867c Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Tooru Fujisawa
b10d0289af Bug 1667455 - Part 4: Stop importing Services.jsm from JSM. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,pip-reviewers,twisniewski,devtools-reviewers,m_kato,jdescottes,ochameau,mconley,sfoster,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D150893
2022-07-11 12:41:50 +00:00
Dimi
9b4c6d488f Bug 1728871 - P4. Check 'Version' in the remote setting record r=leplatrem
Depends on D136107

Differential Revision: https://phabricator.services.mozilla.com/D148650
2022-07-07 15:01:09 +00:00
Dimi
2f6b0b59a1 Bug 1728871 - P3. Add the URLCLASSIFIER_UPDATE_REMOTE_SETTING_RESULT telemetry r=gcp
We can use this telemetry to track the statistics of using
RemoteSettings to serve Safe Browsing data.
The can help us understand if we can roll out this feature to more users.

Depends on D135990

Differential Revision: https://phabricator.services.mozilla.com/D136107
2022-07-07 15:01:09 +00:00
Dimi
bf01aad3f0 Bug 1728871 - P2. Add UrlClassifierRemoteSettingsService testcases r=gcp
Depends on D135989

Differential Revision: https://phabricator.services.mozilla.com/D135990
2022-07-07 15:01:09 +00:00
Dimi
41333ad702 Bug 1728871 - P1. Add UrlClassifierRemoteSettingsService to serve update data over RemoteSettings r=gcp,leplatrem
This patch implements UrlClassifierRemoteSettingsService to get SafeBrowsing data (protocol v2)
from RemoteSettings instead of from the Shavar server. This is only used
by data provided by Mozilla.

To distinguish if the data should be coming from RemoteSettings or
Shavar, We added a custom scheme "moz-sbrs" to denote that the data should be
retrieved from Remote Setting. This is done by changing the value of pref
"browser.safebrowsing.provider.mozilla.updateURL" to something like
"moz-sbrf://tracking-protection-list". (Note that the hostname is not
used at this point).

The goal of this patch is to make the new architecture compatible with
the original Safe Browsing design. So we don't notify Safe Browsing
there is new data available (via "sync" event of RemoteSettings). We still follow
how Safe Browsing periodically checks whether there is a newer version of list.

Note.
This patch changes the flow comparing with how we usualy receive SafeBrowsing response from Shavar.
In Shavar case, the list data response usually comes with
"n:21600\ni:listname1\nu:redirectURL1\ni:listname2\nu:redirectURL2 ..." first.
And then we fetch the data again from the redirectURL for each list.

But in the current implementation, responses don't contain
redirectURL anymore (since we already have the data). So the mocked response
will contain all the data needed in one response.
For example:
"n:21600\ni:listname1\n:chunkdata1\ni:listname2\n:chunkdata2...".

Differential Revision: https://phabricator.services.mozilla.com/D135989
2022-07-07 15:01:08 +00:00
Bogdan Szekely
99ef9e5699 Backed out 4 changesets (bug 1728871) for causing lint failure on test_rsListService.js CLOSED TREE
Backed out changeset 408c00af6ca7 (bug 1728871)
Backed out changeset cd77f62da01f (bug 1728871)
Backed out changeset d3f805b9199b (bug 1728871)
Backed out changeset 19899fa89d05 (bug 1728871)
2022-06-30 11:57:47 +03:00
Dimi
1db464caa1 Bug 1728871 - P4. Check 'Version' in the remote setting record r=leplatrem
Depends on D136107

Differential Revision: https://phabricator.services.mozilla.com/D148650
2022-06-30 06:32:27 +00:00
Dimi
470481824f Bug 1728871 - P3. Add the URLCLASSIFIER_UPDATE_REMOTE_SETTING_RESULT telemetry r=gcp
We can use this telemetry to track the statistics of using
RemoteSettings to serve Safe Browsing data.
The can help us understand if we can roll out this feature to more users.

Depends on D135990

Differential Revision: https://phabricator.services.mozilla.com/D136107
2022-06-30 06:32:27 +00:00
Dimi
f6c5582a39 Bug 1728871 - P2. Add UrlClassifierRemoteSettingsService testcases r=gcp
Depends on D135989

Differential Revision: https://phabricator.services.mozilla.com/D135990
2022-06-30 06:32:26 +00:00
Dimi
6d4aac1374 Bug 1728871 - P1. Add UrlClassifierRemoteSettingsService to serve update data over RemoteSettings r=gcp,leplatrem
This patch implements UrlClassifierRemoteSettingsService to get SafeBrowsing data (protocol v2)
from RemoteSettings instead of from the Shavar server. This is only used
by data provided by Mozilla.

To distinguish if the data should be coming from RemoteSettings or
Shavar, We added a custom scheme "moz-sbrs" to denote that the data should be
retrieved from Remote Setting. This is done by changing the value of pref
"browser.safebrowsing.provider.mozilla.updateURL" to something like
"moz-sbrf://tracking-protection-list". (Note that the hostname is not
used at this point).

The goal of this patch is to make the new architecture compatible with
the original Safe Browsing design. So we don't notify Safe Browsing
there is new data available (via "sync" event of RemoteSettings). We still follow
how Safe Browsing periodically checks whether there is a newer version of list.

Note.
This patch changes the flow comparing with how we usualy receive SafeBrowsing response from Shavar.
In Shavar case, the list data response usually comes with
"n:21600\ni:listname1\nu:redirectURL1\ni:listname2\nu:redirectURL2 ..." first.
And then we fetch the data again from the redirectURL for each list.

But in the current implementation, responses don't contain
redirectURL anymore (since we already have the data). So the mocked response
will contain all the data needed in one response.
For example:
"n:21600\ni:listname1\n:chunkdata1\ni:listname2\n:chunkdata2...".

Differential Revision: https://phabricator.services.mozilla.com/D135989
2022-06-30 06:32:26 +00:00
Mark Banner
f733d566c8 Bug 1646183 - Extend ESLint rule reject-importGlobalProperties to also handle defineLazyGlobalGetters. r=arai,webdriver-reviewers,webcompat-reviewers,extension-reviewers,whimboo,twisniewski,kmag
Differential Revision: https://phabricator.services.mozilla.com/D150353
2022-06-29 22:37:57 +00:00
Ryan VanderMeulen
7d248ce5cf Bug 1773604 - Regenerate classes. r=markh
Differential Revision: https://phabricator.services.mozilla.com/D150295
2022-06-28 01:35:13 +00:00
Joel Maher
5d7fe68032 Bug 1769154 - Run some xpcshell tests with a conditioned profile. r=aryx,extension-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D149937
2022-06-22 16:47:06 +00:00
Bogdan Szekely
72726c29d0 Backed out changeset 7b707ff8a7d1 (bug 1769154) for causing xpcshell failures on test_system_upgrades.js 2022-06-22 17:17:10 +03:00
Joel Maher
c0af767fd4 Bug 1769154 - Run some xpcshell tests with a conditioned profile. r=aryx,extension-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D149937
2022-06-22 13:03:46 +00:00
Dimi
04dfab348a Bug 1773043 - Remove flashblock from SafeBrowsing r=perftest-reviewers,gcp,sparky
Depends on D149129

Differential Revision: https://phabricator.services.mozilla.com/D149130
2022-06-15 12:55:26 +00:00
Joel Maher
01d9fd61d4 Bug 1769257 - run a subset of mochitests with a conditioned profile. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D148651
2022-06-10 19:57:36 +00:00
Mark Banner
ea07246325 Bug 1770727 - Fix remaining ESLint rules for sjs files. r=Gijs,necko-reviewers,kershaw
Depends on D147082

Differential Revision: https://phabricator.services.mozilla.com/D147083
2022-06-07 19:14:09 +00:00
Mark Banner
d9a3157f4e Bug 1770727 - Fix failures of ESLint rule mozilla/use-includes-instead-of-indexOf in sjs files. r=Gijs
Depends on D147081

Differential Revision: https://phabricator.services.mozilla.com/D147082
2022-06-07 19:14:08 +00:00
Mark Banner
347474e794 Bug 1770727 - Fix some more ESLint rules on sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D147080
2022-06-07 19:14:08 +00:00
Tooru Fujisawa
c2e9d336e4 Bug 1772101 - Part 46: Use plain object for lazy getter in toolkit/components/url-classifier/. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D147987
2022-06-07 04:31:06 +00:00
Tooru Fujisawa
139840e345 Bug 1610653 - Part 10: Do not use global this property assignment to define global variable in toolkit/components. r=Standard8,pip-reviewers,mhowell
Differential Revision: https://phabricator.services.mozilla.com/D144117
2022-05-30 15:19:39 +00:00
Molnar Sandor
84cba2a6db Backed out 4 changesets (bug 1770727) for causing mochitest failures in test_bug1180105/test_access_control. CLOSED TREE
Backed out changeset 6323b526b0ac (bug 1770727)
Backed out changeset fc7ea80aa2ff (bug 1770727)
Backed out changeset 2a358ba86652 (bug 1770727)
Backed out changeset 464d1af6523b (bug 1770727)
2022-05-24 17:24:40 +03:00
Mark Banner
3a1785495f Bug 1770727 - Fix remaining ESLint rules for sjs files. r=Gijs,necko-reviewers,kershaw
Depends on D147082

Differential Revision: https://phabricator.services.mozilla.com/D147083
2022-05-24 12:59:10 +00:00
Mark Banner
9bc6698ada Bug 1770727 - Fix failures of ESLint rule mozilla/use-includes-instead-of-indexOf in sjs files. r=Gijs
Depends on D147081

Differential Revision: https://phabricator.services.mozilla.com/D147082
2022-05-24 12:59:09 +00:00
Mark Banner
2b13cf4485 Bug 1770727 - Fix some more ESLint rules on sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D147080
2022-05-24 12:59:08 +00:00
Norisz Fay
65fc7c27f9 Bug 1769828 - Fix lint failure in test_dbservice.js r=fix CLOSED TREE 2022-05-19 16:36:17 +03:00
Dimi
4d3c63fd4f Bug 1769825 - Enable SafeBrowsing features when running test in test_classifier.html r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D146613
2022-05-19 12:41:11 +00:00
Dimi
c81559cca2 Bug 1769828 - Do not assume there is only test tables when running test_dbservice.js r=timhuang
This patch uses Array.includes instead of exact matching to check
whether the test table is present.
This is to address the problem when there is other safe browsing tables
, the testcase fails because `parts` variable contains all the tables.

Differential Revision: https://phabricator.services.mozilla.com/D146614
2022-05-19 12:39:53 +00:00
Mark Banner
cc09541457 Bug 1769569 - Automatically replace Components.* with C* in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146451
2022-05-18 08:13:19 +00:00
Sebastian Hengst
e8e4f38731 Backed out 5 changesets (bug 1769569) for causing devtools' browser/browser_page_redirection.js to fail. CLOSED TREE
Backed out changeset 66a42eb3a366 (bug 1769569)
Backed out changeset d3cc9629cd9a (bug 1769569)
Backed out changeset edcd3dade079 (bug 1769569)
Backed out changeset 29d8dd058b7a (bug 1769569)
Backed out changeset 1aed34fdf2d3 (bug 1769569)
2022-05-17 19:49:17 +02:00
Mark Banner
82aef582ff Bug 1769569 - Automatically replace Components.* with C* in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146451
2022-05-17 16:50:33 +00:00
lyavor
d77f6d400a Bug 1767952 - Update all .sjs test files that use base64ToString() instead of atob. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D145701
2022-05-13 12:20:23 +00:00
Norisz Fay
859fb66266 Backed out changeset 31a206537bb6 (bug 1767952) for causing lint failure on authenticate.sjs CLOSED TREE 2022-05-12 17:47:13 +03:00
lyavor
a66a97d43e Bug 1767952 - Update all .sjs test files that use base64ToString() instead of atob. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D145701
2022-05-12 13:58:24 +00:00
Mathieu Leplatre
9c4746ef13 Bug 1767890 - Prevent packaged dump from being loaded r=robwu
Change tests and snippets in documentation to use `Date.now()` instead of an arbitrary number like `42`.
This way, we make sure the packaged dump isn't loaded on top of the tests data. Indeed, since Bug 1718083 we load the packaged dump if it's newer than local data.

Differential Revision: https://phabricator.services.mozilla.com/D145579
2022-05-10 09:51:50 +00:00
Tooru Fujisawa
aee506cf77 Bug 1765750 - Part 2: Stop using global this in UrlClassifierListManager.jsm. r=gcp
Depends on D144943

Differential Revision: https://phabricator.services.mozilla.com/D144944
2022-04-28 14:52:45 +00:00
Tooru Fujisawa
369cd804e6 Bug 1765750 - Part 1: Stop exposing the global this object in UrlClassifierLib.jsm. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D144943
2022-04-28 14:52:45 +00:00
Serge Guelton
40e6daafb3 Bug 1764411 - Cleanup toolkit/components/url-classifier/ includes r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D143536
2022-04-15 06:58:42 +00:00
Nika Layzell
d10ace1831 Bug 1761511 - Part 5: Fix gtest deprecation warnings, r=ahal
The TEST_CASE_P macros are deprecated in newer versions of gtest.

Differential Revision: https://phabricator.services.mozilla.com/D142612
2022-04-14 02:09:22 +00:00
Cosmin Sabou
46df1845ed Backed out 5 changesets (bug 1761511) for causing build bustages. CLOSED TREE
Backed out changeset 687de8c00013 (bug 1761511)
Backed out changeset 88e6cf5c70e5 (bug 1761511)
Backed out changeset 4c40758f54f1 (bug 1761511)
Backed out changeset 8a18abcccda4 (bug 1761511)
Backed out changeset 1afb1f32a6a4 (bug 1761511)
2022-04-07 00:13:00 +03:00
Nika Layzell
f105462911 Bug 1761511 - Part 5: Fix gtest deprecation warnings, r=ahal
The TEST_CASE_P macros are deprecated in newer versions of gtest.

Differential Revision: https://phabricator.services.mozilla.com/D142612
2022-04-06 20:45:08 +00:00
Frederik Braun
3b6457c94b Bug 1752475 - Change nsICookie/CookieStruct to implicitly flip SameSite in getter func r=dveditz,dragana,freddyb
Given that we only support samesite lax/strict/none in our storage schema,
it's useful to introduce a default value, as required by the spec.
However, that would it hard to distinguish between none/lax when we switch
the default.
So, instead of doing that we use the peculiarities of our current schema
to our advantage: There's a "sameSite" attribute and a "rawSameSite"
attribute, where the latter is the literal value we received from the
server. With this patch, we'll interpret the "sameSite" attribute
based on the laxByDefault pref. This also has the advantage that various
front-end code (e.g., in DevTools) is always reading the "sameSite"
value of nsICookies.

Differential Revision: https://phabricator.services.mozilla.com/D137460
2022-04-05 08:20:25 +00:00
Randell Jesup
d221d55de6 Bug 1207753 - nsUrlClassifier thread-safety annotations r=dimi?
Differential Revision: https://phabricator.services.mozilla.com/D130602
2022-03-22 14:05:08 +00:00
Randell Jesup
855202c183 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli
16f5f5f2b9 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup
a98b1f8218 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila
01197944a0 Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00