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

1336 Коммитов

Автор SHA1 Сообщение Дата
Nika Layzell 3202b3d09e Bug 1789902 - Part 3: Stop generating rust bindings for Services.py, r=xpcom-reviewers,barret
Differential Revision: https://phabricator.services.mozilla.com/D156892
2022-09-13 13:47:14 +00:00
Valentin Gosu 226adb5a86 Bug 1779993 - Reject cookies with no name and a __Secure- or __Host- prefix r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D156554
2022-09-07 19:04:22 +00:00
edgul 17dc8833aa Bug 1787122 - Fixed assert crash when attempting to get base domain from a malformed URL. r=kershaw
Testing will be completed in: https://bugzilla.mozilla.org/show_bug.cgi?id=1788080

Differential Revision: https://phabricator.services.mozilla.com/D155878
2022-08-30 16:49:43 +00:00
Paul Zuehlcke d8ff13e2f9 Bug 1784874 - Add nsICookieManager::getCookieNative. r=necko-reviewers,valentin
Depends on D154993

Differential Revision: https://phabricator.services.mozilla.com/D155088
2022-08-24 14:56:23 +00:00
edguloien 6ff16b6810 Bug 1713203 - Added check for host, scheme and origin attributes check before cookie change broadcast to content processes r=dveditz,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D146346
2022-08-23 17:36:24 +00:00
Mark Banner 5ced04706e Bug 1786068 - Enable ESlint rule no-unused-vars on the global scope for netwerk/ xpcshell-tests. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D155095
2022-08-23 12:06:15 +00:00
Paul Zuehlcke 017ccb0be2 Bug 1783019 - Implement cookie banner handling components. r=timhuang,necko-reviewers,valentin
This patch adds the following components:
 - nsICookieBannerService: Main service singleton managing the rules and initiating other components.
   It's exposed via Services.cookieBanners and can be configured via the cookiebanners.* prefs.
   To enable it set "cookiebanners.service.mode" to 1 or 2 and restart the browser.
 - nsCookieInjector: Looks up rules and injects cookies for matching top level loads.
 - nsICookieBannerListService: Imports and updates the cookie banner rules.
 - nsICookieBannerRule: Rules for a given domain.
 - nsICookieRule: Part of nsICookieBannerRule. Holds cookie specific rules.

Depends on D153641

Differential Revision: https://phabricator.services.mozilla.com/D153642
2022-08-16 12:07:13 +00:00
Tooru Fujisawa a032f53a63 Bug 1780543 - Part 5: Add mozilla/chrome-script environment. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D152430
2022-07-26 02:46:30 +00:00
Tom Ritter b732796900 Bug 1770498: Create ShouldRFP(nsILoadInfo) and make ShouldRFP(nsIPrincipal) explicitly dangerous r=timhuang
- Move ShouldRFP(char*), ShouldRFP(docshell), ShouldRFP(Document)
  below some utility code.

- Now that we know we should check the CookieJarSettings, using
  ShouldRFP(nsIPrincipal) is dangerous.  We mark it as dangerous
  and annotate the existing uses of it.

- At the same time, an nsILoadInfo has the CookieJarSettings we
  want to check, so create a ShouldRFP(nsILoadInfo) that checks
  it and cascades to the (marked-dangerous-but-not-dangerous-for-
  this-call) principal function.

- We also correct a situation where WorkerLoadInfo does not
  initialize the shouldRFP member.

Differential Revision: https://phabricator.services.mozilla.com/D150591
2022-07-15 20:39:20 +00:00
Tom Ritter 1c40624193 Bug 1770498: Populate the RFP member of CookieJar Settings r=timhuang,geckoview-reviewers,owlish
CookieJarSettings frequently gets populated in a place
where we have ready access to the Document/Channel it
is being constructed for. This lets us populate the boolean
and pass it into CookieJarSetting's constructor easily.

When it is created for LoadInfo, we need to plumb the URI
through by adding it to LoadInfo::CreateForDocument.

Differential Revision: https://phabricator.services.mozilla.com/D150588
2022-07-15 20:39:19 +00:00
Tom Ritter 489d2393ae Bug 1770498: Add RFP to CookieJarSettings r=timhuang
Before we took a very simplistic view to domain-based RFP
exemptions - if the loading principal said an exempted
domain, you were exempted.

This did not intelligently take into account iframes. In
particular, if a non-exempted domain framed an exempted
domain, the exempted domain's iframe would be exempted.

It probably should not. This is debatable, but at this
point in time after consultation with Tor we are going
to take the approach described in the comments in
CookieJarSettings.h

Notably this is creating a gap when it comes to nested
iframes.  If an exempted domain iframes a non-exempted
domain, which in turn iframes an exempted domain - the
innermost iframe will be exempted even though its parent
is not.  This is not ideal, once a document is non-
exempted, all children should be non-exempted. But this
is especially difficult to implement with the facilities
easily available to us, so we leave this corner case for
another day.

Differential Revision: https://phabricator.services.mozilla.com/D150587
2022-07-15 20:39:18 +00:00
Thomas Wisniewski d1c82fe05f Bug 1758745 - Refactor EffectiveStoragePrincipal to EffectiveCookiePrincipal and create new function EffectiveStoragePrincipal that is never unpartitioned; r=bvandersloot
Depends on D143626

Differential Revision: https://phabricator.services.mozilla.com/D143627
2022-07-15 13:26:17 +00:00
Cristian Tuns 2f5fe88da3 Backed out 19 changesets (bug 1758745, bug 1758740, bug 1762462, bug 1779603) for causing mochitest failures on browser_partitionedConsoleMessage.js CLOSED TREE
Backed out changeset e3c8cd6f00b6 (bug 1779603)
Backed out changeset 4e46a6f209b4 (bug 1762462)
Backed out changeset 00c0c6314640 (bug 1762462)
Backed out changeset 8f11221f859f (bug 1762462)
Backed out changeset ffbf90e3bbab (bug 1762462)
Backed out changeset 0c760428dfec (bug 1762462)
Backed out changeset 7c99293cc8f9 (bug 1762462)
Backed out changeset 92bd237a95e1 (bug 1762462)
Backed out changeset 74539a3cc7fc (bug 1762462)
Backed out changeset acf08a10c6fb (bug 1762462)
Backed out changeset 0cf191a7739f (bug 1762462)
Backed out changeset 030c276d6669 (bug 1762462)
Backed out changeset a88a099c684d (bug 1762462)
Backed out changeset cbd69786a24b (bug 1762462)
Backed out changeset e5e0655206a8 (bug 1762462)
Backed out changeset 707f9dfed501 (bug 1762462)
Backed out changeset 619e4bb01a81 (bug 1762462)
Backed out changeset 02b7641683b0 (bug 1758745)
Backed out changeset a2f110442038 (bug 1758740)
2022-07-14 17:26:17 -04:00
Thomas Wisniewski 3f80260311 Bug 1758745 - Refactor EffectiveStoragePrincipal to EffectiveCookiePrincipal and create new function EffectiveStoragePrincipal that is never unpartitioned; r=bvandersloot
Depends on D143626

Differential Revision: https://phabricator.services.mozilla.com/D143627
2022-07-14 19:26:26 +00:00
Kagami Sascha Rosylight d0b83eb89d Bug 1769290 - Part 16: Apply mozilla-js-handle-rooted-typedef against netwerk r=andi
Differential Revision: https://phabricator.services.mozilla.com/D151783
2022-07-14 17:00:21 +00:00
Norisz Fay 388468729f Backed out 18 changesets (bug 1762462, bug 1758745, bug 1758740) for causing mochitest failures on test_storage_copied.html
Backed out changeset a27ae15872a9 (bug 1762462)
Backed out changeset b7d979a36324 (bug 1762462)
Backed out changeset 6249efe40513 (bug 1762462)
Backed out changeset 1e81ed3014a0 (bug 1762462)
Backed out changeset 92cec5f5db1c (bug 1762462)
Backed out changeset fa3c45b4de5c (bug 1762462)
Backed out changeset 64df67f43ad7 (bug 1762462)
Backed out changeset d66dd76ec2b6 (bug 1762462)
Backed out changeset 4f8aaba02a03 (bug 1762462)
Backed out changeset 81eb7d60dea9 (bug 1762462)
Backed out changeset 01504f5f818a (bug 1762462)
Backed out changeset 2615b571c9ba (bug 1762462)
Backed out changeset 73ed8be3f117 (bug 1762462)
Backed out changeset edb94ba8ec59 (bug 1762462)
Backed out changeset 21dd6fdc672e (bug 1762462)
Backed out changeset 31a70f9ad879 (bug 1762462)
Backed out changeset 5261ee5a2368 (bug 1758745)
Backed out changeset ad6ffd85ef3c (bug 1758740)
2022-07-14 03:16:08 +03:00
Thomas Wisniewski 7a3c3e5c10 Bug 1758745 - Refactor EffectiveStoragePrincipal to EffectiveCookiePrincipal and create new function EffectiveStoragePrincipal that is never unpartitioned; r=bvandersloot
Depends on D143626

Differential Revision: https://phabricator.services.mozilla.com/D143627
2022-07-13 22:44:57 +00:00
Cosmin Sabou 85307ea6b9 Backed out 3 changesets (bug 1750972) for potential site breakage.
Backed out changeset 90d51383665c (bug 1750972)
Backed out changeset 3b7d15317952 (bug 1750972)
Backed out changeset b1a8adcb9099 (bug 1750972)
2022-07-13 12:36:32 +03:00
Tooru Fujisawa 54623364da Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-12 04:21:34 +00:00
Andreea Pavel 7738a75fdd Backed out 11 changesets (Bug 1777486) for failing bc at browser_startup.js on a CLOSED TREE
Backed out changeset b6c4c386f1a6 (Bug 1777486)
Backed out changeset 195cc2de8433 (Bug 1777486)
Backed out changeset 20c746fb1648 (Bug 1777486)
Backed out changeset d5fd8173d62d (Bug 1777486)
Backed out changeset 6d758fab5a3e (Bug 1777486)
Backed out changeset e938b601ba15 (Bug 1777486)
Backed out changeset 0c4ea0b9416b (Bug 1777486)
Backed out changeset 0559c53cc668 (Bug 1777486)
Backed out changeset eea573d3a9f9 (Bug 1777486)
Backed out changeset 9ce3a6496a49 (bug 1777486)
Backed out changeset b0867652fc48 (bug 1777486)
2022-07-11 22:24:40 +03:00
Tooru Fujisawa 8cd6ed7409 Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-11 15:09:13 +00:00
Tooru Fujisawa 47c8f80432 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 bf93d07148 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
Tom Schuster 699741deb6 Bug 1750972 - Remove tests setting noneRequiresSecure = true. r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D150603
2022-07-04 10:22:50 +00:00
Hannah Peuckmann ecaca99133 Bug 1764761 - Remove cookie.lifetimePolicy macros ACCEPT_SESSION/NORMALLY. r=pbz,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D149202
2022-06-29 17:33:38 +00:00
Hannah Peuckmann 7c1bad4edc Bug 1764761 - Remove/replace the network.cookie.lifetimePolicy. r=pbz,necko-reviewers,mkaply,dom-storage-reviewers,agi,asuth,dragana
Differential Revision: https://phabricator.services.mozilla.com/D144548
2022-06-29 17:33:37 +00:00
Hannah Peuckmann b233155a3b Bug 1759665 - Remove usage of StaticPref::network.cookie.lifetimePolicy.r=necko-reviewers,pbz,janv,dragana,timhuang,asuth
Differential Revision: https://phabricator.services.mozilla.com/D143062
2022-06-29 17:33:37 +00:00
Mark Banner b813d15395 Bug 1766228 - Add nsICookieService as an acceptable interface for Services.cookies. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D149392
2022-06-16 21:11:24 +00:00
Norisz Fay 7cd43cc697 Backed out 5 changesets (bug 1766228) for causing lint failures on test_restrequest.js CLOSED TREE
Backed out changeset 5ff1634cfe18 (bug 1766228)
Backed out changeset 01642c97e7a5 (bug 1766228)
Backed out changeset cbba28151712 (bug 1766228)
Backed out changeset 76a32127865d (bug 1766228)
Backed out changeset 2c7ef1ad380a (bug 1766228)
2022-06-16 16:36:44 +03:00
Mark Banner eac3f080b3 Bug 1766228 - Add nsICookieService as an acceptable interface for Services.cookies. r=kmag
Depends on D149391

Differential Revision: https://phabricator.services.mozilla.com/D149392
2022-06-16 12:09:27 +00:00
Tom Schuster 934b379383 Bug 1763073 - Add telemetry (and messaging) for SameSite cookies blocked due to redirects. r=freddyb,dveditz
Differential Revision: https://phabricator.services.mozilla.com/D143034
2022-06-15 14:51:16 +00:00
Benjamin VanderSloot 5157d54b3b Bug 1765313, part 2 - Move the ShouldAllowAccessFor functions to StorageAccess.h, r=anti-tracking-reviewers,timhuang
These functions are used to check if an object or context should have storage access.
Therefore they belong in StorageAccess.h with other functions that serve this purpose.

Differential Revision: https://phabricator.services.mozilla.com/D148285
2022-06-08 21:57:16 +00:00
Marian-Vasile Laza a0f6973887 Backed out 5 changesets (bug 1765313, bug 1770403) for causing bc failures on browser_storageAccessPrivilegeAPI.js. CLOSED TREE
Backed out changeset 22153c8641e1 (bug 1765313)
Backed out changeset 588d54f796a0 (bug 1765313)
Backed out changeset 2376ca53eb9c (bug 1765313)
Backed out changeset 9cf02ec5657a (bug 1770403)
Backed out changeset 7d8147ba25e8 (bug 1770403)
2022-06-08 22:07:37 +03:00
Benjamin VanderSloot b52e3e14a8 Bug 1765313, part 2 - Move the ShouldAllowAccessFor functions to StorageAccess.h, r=anti-tracking-reviewers,timhuang
These functions are used to check if an object or context should have storage access.
Therefore they belong in StorageAccess.h with other functions that serve this purpose.

Differential Revision: https://phabricator.services.mozilla.com/D148285
2022-06-08 17:11:19 +00:00
Molnar Sandor 4012088f05 Backed out 5 changesets (bug 1765313, bug 1770403) for causing lint failure in tools/lint/rejected-words.yml CLOSED TREE
Backed out changeset c76671d99573 (bug 1765313)
Backed out changeset f0895e88c27e (bug 1765313)
Backed out changeset 81a0f8c40381 (bug 1765313)
Backed out changeset a11f5453e441 (bug 1770403)
Backed out changeset df452028881c (bug 1770403)
2022-06-08 15:48:57 +03:00
Benjamin VanderSloot b99dc899f7 Bug 1765313, part 2 - Move the ShouldAllowAccessFor functions to StorageAccess.h, r=anti-tracking-reviewers,timhuang
These functions are used to check if an object or context should have storage access.
Therefore they belong in StorageAccess.h with other functions that serve this purpose.

Differential Revision: https://phabricator.services.mozilla.com/D148285
2022-06-08 12:18:22 +00:00
Hannah Peuckmann f96337e925 Bug 1770881 - Mapping active logins to privacy.clearOnShutdown.sessions instead of -session . r=pbz
Differential Revision: https://phabricator.services.mozilla.com/D147130
2022-05-24 17:37:53 +00:00
Hannah Peuckmann ab8129c686 Bug 1681498 - Migrate users from network.cookie.lifetimePolicy to sanitize on shutdown prefs. r=pbz,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D139102
2022-05-19 14:08:15 +00:00
Mark Banner 7c198e01fd Bug 1769569 - Fix remaining ESLint no-undef and no-unused-vars issues in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146452
2022-05-18 08:13:19 +00:00
Sebastian Hengst c552340e0c 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 5865f044db Bug 1769569 - Fix remaining ESLint no-undef and no-unused-vars issues in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146452
2022-05-17 16:50:33 +00:00
Cristian Tuns 23517e3d2b Backed out 3 changesets (bug 1758745, bug 1758740, bug 1762462) for causing mochitest failures on test_storagePermissionsAccept.html CLOSED TREE
Backed out changeset fa222c0a9a26 (bug 1762462)
Backed out changeset 9daa04b239f9 (bug 1758745)
Backed out changeset c18aecb431c0 (bug 1758740)
2022-05-10 20:12:45 -04:00
Thomas Wisniewski 37c3de998a Bug 1758745 - Refactor EffectiveStoragePrincipal to EffectiveCookiePrincipal and create new function EffectiveStoragePrincipal that is never unpartitioned; r=twisniewski
Depends on D143626

Differential Revision: https://phabricator.services.mozilla.com/D143627
2022-05-10 21:49:42 +00:00
Butkovits Atila 387096a2fc Backed out 3 changesets (bug 1758745, bug 1758740, bug 1762462) for causing failures at browser_storage_dfpi.js. CLOSED TREE
Backed out changeset a3024e8b2a58 (bug 1762462)
Backed out changeset 8bc1291b9bdb (bug 1758745)
Backed out changeset c7b693b2fd05 (bug 1758740)
2022-05-10 16:17:59 +03:00
Thomas Wisniewski 6cae86aea9 Bug 1758745 - Refactor EffectiveStoragePrincipal to EffectiveCookiePrincipal and create new function EffectiveStoragePrincipal that is never unpartitioned; r=twisniewski
Depends on D143626

Differential Revision: https://phabricator.services.mozilla.com/D143627
2022-05-10 12:05:51 +00:00
Molnar Sandor 9d544b1925 Backed out changeset 9cc08c2f20be (bug 239460) for causing build bustage. CLOSED TREE 2022-04-07 03:02:28 +03:00
Nika Layzell 2b2d7891c1 Bug 239460 - Specify types for XPIDL consts in C++, r=xpcom-reviewers,mccr8
Before this change, all XPIDL constants were declared using an anonymous
`enum` rather than using a static constant. This change makes the
generated code more consistent with what is done in languages like Rust.

Some small changes were needed due to signed/unsigned comparison
warnings which were previously silent.

Differential Revision: https://phabricator.services.mozilla.com/D143090
2022-04-06 23:40:47 +00:00
Frederik Braun 30ca834b74 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
Tim Huang 491c607938 Bug 1727301 - Part 2: The disallowing less restricted referrer policy can be disabled by ETP toggle. r=ckerschb,pbz,smaug
This patch implements that the referrer protection can be disabled by
the ETP toggle. When ETP is toggled off, it will stop the protection for
iframe and sub-resource loads. Also, it will stop the protection for a
loading to a site that has ETP disabled.

This patch also makes
CookieJarSettings::UpdateIsOnContentBlockingAllowList() be more
efficient when calling it multiple times.

Differential Revision: https://phabricator.services.mozilla.com/D142249
2022-03-30 19:45:29 +00:00
Gijs Kruitbosch 8e67201171 Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 16:16:42 +00:00