Commit Graph

319 Commits

Author SHA1 Message Date
Artur Iunusov
67db960e48 Bug 1770944 - Remove isInIsolatedMozBrowserElement. r=smaug,necko-reviewers,kershaw,valentin
Depends on D183229

Differential Revision: https://phabricator.services.mozilla.com/D183230
2024-03-07 13:04:22 +00:00
Narcis Beleuzu
7eae8c1064 Backed out 16 changesets (bug 1770944) as req by asuth.
Backed out changeset 61af32f40777 (bug 1770944)
Backed out changeset 4ff0c45db93b (bug 1770944)
Backed out changeset 8a217eff7bcd (bug 1770944)
Backed out changeset 6435f48c96bf (bug 1770944)
Backed out changeset 0d2432765ca0 (bug 1770944)
Backed out changeset 58e02566db85 (bug 1770944)
Backed out changeset 0a8c4c2460ee (bug 1770944)
Backed out changeset 9416bafd9982 (bug 1770944)
Backed out changeset 79de4f83fe2e (bug 1770944)
Backed out changeset 63ac518aceb0 (bug 1770944)
Backed out changeset 14952f872b77 (bug 1770944)
Backed out changeset f65e0967ad75 (bug 1770944)
Backed out changeset bd53c42038f7 (bug 1770944)
Backed out changeset 36c378ba8212 (bug 1770944)
Backed out changeset 9ba54ab06348 (bug 1770944)
Backed out changeset fb5a54b3cbe9 (bug 1770944)
2024-02-23 21:11:08 +02:00
Artur Iunusov
8a817efa45 Bug 1770944 - Remove isInIsolatedMozBrowserElement. r=smaug,necko-reviewers,kershaw,valentin
Depends on D183229

Differential Revision: https://phabricator.services.mozilla.com/D183230
2024-02-22 10:13:14 +00:00
Sandor Molnar
be27c149eb Backed out 16 changesets (bug 1770944) for causing asan failures @ dom/base/InProcessBrowserChildMessageManager.cpp
Backed out changeset b73885731e73 (bug 1770944)
Backed out changeset 23d0dc98eb51 (bug 1770944)
Backed out changeset 15661e24d8e1 (bug 1770944)
Backed out changeset 97aa839dc200 (bug 1770944)
Backed out changeset 0d4318bf3239 (bug 1770944)
Backed out changeset be28bb62e9f3 (bug 1770944)
Backed out changeset 708b2671410e (bug 1770944)
Backed out changeset 0a138f3b56b9 (bug 1770944)
Backed out changeset 3a149ef794c2 (bug 1770944)
Backed out changeset 4b6ae7dd0e69 (bug 1770944)
Backed out changeset e3960ad85182 (bug 1770944)
Backed out changeset 9ea253525227 (bug 1770944)
Backed out changeset 1828b66c2f7c (bug 1770944)
Backed out changeset 55b0886f9025 (bug 1770944)
Backed out changeset a4197071d10a (bug 1770944)
Backed out changeset 9b18524f541e (bug 1770944)
2024-02-20 20:34:55 +02:00
Artur Iunusov
ad804b13e8 Bug 1770944 - Remove isInIsolatedMozBrowserElement. r=smaug,necko-reviewers,kershaw,valentin
Depends on D183229

Differential Revision: https://phabricator.services.mozilla.com/D183230
2024-02-20 16:53:23 +00:00
Tooru Fujisawa
31ceef48aa Bug 1861819 - Use JS::ParseJSONWithHandler in BasePrincipal. r=peterv
This avoid intermediate object tree for "JSON to principal" case.

Differential Revision: https://phabricator.services.mozilla.com/D192146
2024-01-26 15:39:39 +00:00
Tooru Fujisawa
3b9cb7a38a Bug 1861787 - Use mfbt/JSONWriter.h in BasePrincipal. r=peterv
This avoid intermediate object tree for "principal to JSON" case.
Bug 1861819 will handle the opposite case.

Differential Revision: https://phabricator.services.mozilla.com/D192145
2024-01-26 15:39:38 +00:00
Timothy Nikkel
6cac46fa3b Bug 1864267. Silence warning in BasePrincipal::GetIsLoopbackHost. r=nchevobbe
Just starting up a debug build you will get 40 copies of this printed.

The uri that we fail to get host of is about:newtab. One stack looks like this

#02: mozilla::BasePrincipal::GetIsLoopbackHost(bool*)
#03: mozilla::net::LoadInfo::LoadInfo(nsIPrincipal*, nsIPrincipal*, nsINode*, unsigned int, nsIContentPolicy::nsContentPolicyType, mozilla::Maybe<mozilla::dom::ClientInfo> const&, mozilla::Maybe<mozilla::dom::ServiceWorkerDescriptor> const&, unsigned int, bool
#04: ShouldLoadCachedImage(imgRequest*, mozilla::dom::Document*, nsIPrincipal*, nsIContentPolicy::nsContentPolicyType, bool)
#05: imgLoader::LoadImage(nsIURI*, nsIURI*, nsIReferrerInfo*, nsIPrincipal*, unsigned long long, nsILoadGroup*, imgINotificationObserver*, nsINode*, mozilla::dom::Document*, unsigned int, nsISupports*, nsIContentPolicy::nsContentPolicyType, nsTSubstring<char16
#06: nsContentUtils::LoadImage(nsIURI*, nsINode*, mozilla::dom::Document*, nsIPrincipal*, unsigned long long, nsIReferrerInfo*, imgINotificationObserver*, int, nsTSubstring<char16_t> const&, imgRequestProxy**, nsIContentPolicy::nsContentPolicyType, bool, bool,
#07: mozilla::css::ImageLoader::LoadImage(mozilla::StyleComputedUrl const&, mozilla::dom::Document&)
#08: mozilla::StyleComputedUrl::ResolveImage(mozilla::dom::Document&, mozilla::StyleComputedUrl const*)
#09: nsStyleImageLayers::ResolveImages(mozilla::dom::Document&, nsStyleImageLayers const*)
#10: mozilla::ComputedStyle::StartImageLoads(mozilla::dom::Document&, mozilla::ComputedStyle const*)

Differential Revision: https://phabricator.services.mozilla.com/D193349
2023-11-15 09:56:43 +00:00
Nika Layzell
1fdee2314c Bug 1839920 - Rename Get{ASCII,UTF}Origin to GetWebExposedOriginSerialization, r=smaug,necko-reviewers,anti-tracking-reviewers,bvandersloot,jesup
This should make uses of the type more clearly indicating where the
origin came from, and should help avoid potential confusion between this
origin and nsIPrincipal::origin in new code.

This new name is long, but explicit. The string returned from this
function corresponds to the "serialization of an origin" from the WHATWG
html spec:
https://html.spec.whatwg.org/multipage/browsers.html#ascii-serialisation-of-an-origin

Differential Revision: https://phabricator.services.mozilla.com/D181794
2023-06-27 19:59:15 +00:00
Otto Länd
bfac3d8ff7 Bug 1830070: apply code formatting via Lando
# ignore-this-changeset
2023-06-27 03:34:34 +00:00
Tom Ritter
502de3fe32 Bug 1830070: Correctly apply RFP Checks to about: documents and deal with pop-ups r=smaug,necko-reviewers,emilio
This patch has three parts to it:

1) Use NS_IsContentAccessibleAboutURI to ensure that only safe
   about: documents get exempted.

   With this change, we will no longer allow about:blank or
   about:srcdoc to be exempted base on URI.  If they are to be
   exempted, it will need to be base on other information.

2) In Document::RecomputeResistFingerprinting we previously
   deferred to a Parent Document if we had one, and either the
   principals matched or we were a null principal.

   We will do the same thing, except we will also defer to our
   opener as well as the parent document.  Now about:blank
   documents can be exempted.

   However, this deferral only works if the opener is
   same-process. For cross-process openers, we make the decision
   ourselves.

We can make the wrong decision though. CookieJarSettings is
inherited through iframes but it is _not_ inherited through popups.
(Yet. There's some discussion there, but it's not implemented.)

Conceptually; however, we do want CJS to inherit, and we do want
RFP to inherit as well.  Because a popup can collude with its
opener to bypass RFP and Storage restrictions, we should propagate
the CJS information.

This does lead to an unusual situation: if you have exempted
b.com, and a.com (which is not exempted) creates a popup for b.com
then that popup will not be exempted.  But an open tab for b.com
would be.  And it might be hard to tell those two apart, or why
they behave differently.

The third part of the patch:

3) In LoadInfo we want to populate information down from the
   opener to the popup.  This is needed because otherwise a
   cross-origin popup will not defer to its opener (because in
   Fission they're in different processes) and will decide if
   it should be exempted itself. It's the CookieJarSettings
   object that prevents the cross-origin document from thinking
   it should be exempted - CJS tells it 'No, you're a child
   (either a subdocument or a popup) and if I say you don't get
   an exemption, you don't.'


Finally, there is one more caveat: we can only defer to a parent
document or opener if it still exists.  A popup may outlive its
opener. If that happens, and something induces a call to
RecomputeResistFingerprinting, then (e.g.) an about:blank popup
may lose an RFP exemption that it had received from its parent.
This isn't expected to happen in practice -
RecomputeResistFingerprinting is only called on document creation
and pref changes I believe.

It is not possible for a popup to _gain_ an exemption though,
because even if the parent document is gone, the CJS lives on and
restricts it.

Differential Revision: https://phabricator.services.mozilla.com/D178866
2023-06-27 03:31:02 +00:00
Butkovits Atila
fdecfc4373 Backed out 9 changesets (bug 1830070) for causing failures at browser_hwconcurrency_popups_blob_noopener.js. CLOSED TREE
Backed out changeset 62f439f5b2ad (bug 1830070)
Backed out changeset 92b5f8af326f (bug 1830070)
Backed out changeset ae685d3825b7 (bug 1830070)
Backed out changeset 4800b1312e99 (bug 1830070)
Backed out changeset 7ea9676f22ae (bug 1830070)
Backed out changeset 7a86f85ae0e8 (bug 1830070)
Backed out changeset 0a2d5f339e41 (bug 1830070)
Backed out changeset 7e5b72c73304 (bug 1830070)
Backed out changeset e4490bf3d040 (bug 1830070)
2023-06-27 00:12:07 +03:00
Otto Länd
e0ce52807a Bug 1830070: apply code formatting via Lando
# ignore-this-changeset
2023-06-26 17:28:39 +00:00
Tom Ritter
78fae782d0 Bug 1830070: Correctly apply RFP Checks to about: documents and deal with pop-ups r=smaug,necko-reviewers,emilio
This patch has three parts to it:

1) Use NS_IsContentAccessibleAboutURI to ensure that only safe
   about: documents get exempted.

   With this change, we will no longer allow about:blank or
   about:srcdoc to be exempted base on URI.  If they are to be
   exempted, it will need to be base on other information.

2) In Document::RecomputeResistFingerprinting we previously
   deferred to a Parent Document if we had one, and either the
   principals matched or we were a null principal.

   We will do the same thing, except we will also defer to our
   opener as well as the parent document.  Now about:blank
   documents can be exempted.

   However, this deferral only works if the opener is
   same-process. For cross-process openers, we make the decision
   ourselves.

We can make the wrong decision though. CookieJarSettings is
inherited through iframes but it is _not_ inherited through popups.
(Yet. There's some discussion there, but it's not implemented.)

Conceptually; however, we do want CJS to inherit, and we do want
RFP to inherit as well.  Because a popup can collude with its
opener to bypass RFP and Storage restrictions, we should propagate
the CJS information.

This does lead to an unusual situation: if you have exempted
b.com, and a.com (which is not exempted) creates a popup for b.com
then that popup will not be exempted.  But an open tab for b.com
would be.  And it might be hard to tell those two apart, or why
they behave differently.

The third part of the patch:

3) In LoadInfo we want to populate information down from the
   opener to the popup.  This is needed because otherwise a
   cross-origin popup will not defer to its opener (because in
   Fission they're in different processes) and will decide if
   it should be exempted itself. It's the CookieJarSettings
   object that prevents the cross-origin document from thinking
   it should be exempted - CJS tells it 'No, you're a child
   (either a subdocument or a popup) and if I say you don't get
   an exemption, you don't.'


Finally, there is one more caveat: we can only defer to a parent
document or opener if it still exists.  A popup may outlive its
opener. If that happens, and something induces a call to
RecomputeResistFingerprinting, then (e.g.) an about:blank popup
may lose an RFP exemption that it had received from its parent.
This isn't expected to happen in practice -
RecomputeResistFingerprinting is only called on document creation
and pref changes I believe.

It is not possible for a popup to _gain_ an exemption though,
because even if the parent document is gone, the CJS lives on and
restricts it.

Differential Revision: https://phabricator.services.mozilla.com/D178866
2023-06-26 17:04:40 +00:00
Natalia Csoregi
37db79aab5 Backed out 8 changesets (bug 1830070) for causing assertion failures on nsAboutProtocolUtils.h. CLOSED TREE
Backed out changeset 05c4b06857fb (bug 1830070)
Backed out changeset f264c5b9c200 (bug 1830070)
Backed out changeset 45032e474c29 (bug 1830070)
Backed out changeset fa89c51ef6fc (bug 1830070)
Backed out changeset f0f70e7c8250 (bug 1830070)
Backed out changeset 785e1775c13d (bug 1830070)
Backed out changeset 582e28b83b50 (bug 1830070)
Backed out changeset de379bee27d0 (bug 1830070)
2023-06-19 23:51:04 +03:00
Tom Ritter
bc2e6a72ad Bug 1830070: Correctly apply RFP Checks to about: documents and deal with pop-ups r=smaug,necko-reviewers,emilio
This patch has three parts to it:

1) Use NS_IsContentAccessibleAboutURI to ensure that only safe
   about: documents get exempted.

   With this change, we will no longer allow about:blank or
   about:srcdoc to be exempted base on URI.  If they are to be
   exempted, it will need to be base on other information.

2) In Document::RecomputeResistFingerprinting we previously
   deferred to a Parent Document if we had one, and either the
   principals matched or we were a null principal.

   We will do the same thing, except we will also defer to our
   opener as well as the parent document.  Now about:blank
   documents can be exempted.

   However, this deferral only works if the opener is
   same-process. For cross-process openers, we make the decision
   ourselves.

We can make the wrong decision though. CookieJarSettings is
inherited through iframes but it is _not_ inherited through popups.
(Yet. There's some discussion there, but it's not implemented.)

Conceptually; however, we do want CJS to inherit, and we do want
RFP to inherit as well.  Because a popup can collude with its
opener to bypass RFP and Storage restrictions, we should propagate
the CJS information.

This does lead to an unusual situation: if you have exempted
b.com, and a.com (which is not exempted) creates a popup for b.com
then that popup will not be exempted.  But an open tab for b.com
would be.  And it might be hard to tell those two apart, or why
they behave differently.

The third part of the patch:

3) In LoadInfo we want to populate information down from the
   opener to the popup.  This is needed because otherwise a
   cross-origin popup will not defer to its opener (because in
   Fission they're in different processes) and will decide if
   it should be exempted itself. It's the CookieJarSettings
   object that prevents the cross-origin document from thinking
   it should be exempted - CJS tells it 'No, you're a child
   (either a subdocument or a popup) and if I say you don't get
   an exemption, you don't.'


Finally, there is one more caveat: we can only defer to a parent
document or opener if it still exists.  A popup may outlive its
opener. If that happens, and something induces a call to
RecomputeResistFingerprinting, then (e.g.) an about:blank popup
may lose an RFP exemption that it had received from its parent.
This isn't expected to happen in practice -
RecomputeResistFingerprinting is only called on document creation
and pref changes I believe.

It is not possible for a popup to _gain_ an exemption though,
because even if the parent document is gone, the CJS lives on and
restricts it.

Differential Revision: https://phabricator.services.mozilla.com/D178866
2023-06-19 20:03:27 +00:00
Peter Van der Beken
46c52d2b18 Bug 1795312 - Optimize serializing enums as JSON string keys for principals. r=farre
Depends on D166953

Differential Revision: https://phabricator.services.mozilla.com/D166954
2023-02-14 10:17:17 +00:00
Peter Van der Beken
cec60f10c8 Bug 1795312 - Avoid a Json::Value copy. r=farre
Depends on D166810

Differential Revision: https://phabricator.services.mozilla.com/D166953
2023-02-14 10:17:17 +00:00
Peter Van der Beken
05fc824ead Bug 1795312 - Cache the Json::StreamWriterBuilder for serializing principals. r=farre
Depends on D166783

Differential Revision: https://phabricator.services.mozilla.com/D166810
2023-02-14 10:17:17 +00:00
Andreas Farre
b09078e6a7 Bug 1795312 - Don't Base64 encode principals when serializing. r=peterv
Base64 encoding is done to top-level principal and the sub-principals
of expanded principals. Getting rid of the Base64 encoding entirely
also lets us use jsoncpp consider expanded principals to be entirely
serialized as JSON.

Differential Revision: https://phabricator.services.mozilla.com/D166783
2023-02-14 10:17:16 +00:00
Cristina Horotan
4f2132fd1e Backed out 5 changesets (bug 1795312) for causing build bustage at BasePrincipal.h on a CLOSED TREE
Backed out changeset c4f9e74d6164 (bug 1795312)
Backed out changeset 2594a213283c (bug 1795312)
Backed out changeset bc1c5b1c2d85 (bug 1795312)
Backed out changeset 38f9e767cc32 (bug 1795312)
Backed out changeset a732c5bcc392 (bug 1795312)
2023-02-08 19:33:48 +02:00
Peter Van der Beken
40c317a4de Bug 1795312 - Optimize serializing enums as JSON string keys for principals. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D166954
2023-02-08 12:57:10 +00:00
Peter Van der Beken
ac65f99ac2 Bug 1795312 - Avoid a Json::Value copy. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D166953
2023-02-08 12:57:10 +00:00
Peter Van der Beken
6fc2cc9d41 Bug 1795312 - Cache the Json::StreamWriterBuilder for serializing principals. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D166810
2023-02-08 12:57:09 +00:00
Andreas Farre
ff25742a1d Bug 1795312 - Don't Base64 encode principals when serializing. r=peterv
Base64 encoding is done to top-level principal and the sub-principals
of expanded principals. Getting rid of the Base64 encoding entirely
also lets us use jsoncpp consider expanded principals to be entirely
serialized as JSON.

Differential Revision: https://phabricator.services.mozilla.com/D166783
2023-02-08 12:57:09 +00:00
Dave Townsend
b752598495 Bug 1792138: Show the extension's name in permission prompts for opening external links. r=ckerschb,robwu,fluent-reviewers,pbz,flod
In order to handle the content script case correctly we must expose the
contentScriptAddonPolicy to JavaScript. With that we can always see what
extension is trying to perform an action and use its name rather than internal
ID in the dialog.

Differential Revision: https://phabricator.services.mozilla.com/D161282
2023-01-07 17:53:19 +00:00
Stanca Serban
bd29139bde Backed out changeset 514642d76faa (bug 1792138) for causing mochitests failures in test_ext_protocolHandlers.html. CLOSED TREE 2022-12-13 14:53:38 +02:00
Dave Townsend
e021cf6a60 Bug 1792138: Show the extension's name in permission prompts for opening external links. r=ckerschb,robwu,fluent-reviewers,pbz,flod
In order to handle the content script case correctly we must expose the
contentScriptAddonPolicy to JavaScript. With that we can always see what
extension is trying to perform an action and use its name rather than internal
ID in the dialog.

Differential Revision: https://phabricator.services.mozilla.com/D161282
2022-12-13 10:43:32 +00:00
Nika Layzell
2869537fdd Bug 1443925 - Part 11: Document thread safety requirements for most principal methods, r=ckerschb
After the previous changes, the majority of methods on nsIPrincipal are now
threadsafe. This patch documents which methods are still bound to the main
thread, and adds thread assertions to them to avoid potential misuse.

Differential Revision: https://phabricator.services.mozilla.com/D163041
2022-12-02 00:53:53 +00:00
Nika Layzell
664e7d8b0e Bug 1443925 - Part 10: Use AddonPolicyCore rather than AddonPolicy for principals, r=ckerschb,extension-reviewers,kmag
This changes out almost all places `AddonPolicy()` is used within nsIPrincipal
implementations, replacing it with the threadsafe `AddonPolicyCore()` method
and `WebExtensionPolicyCore` type.

Differential Revision: https://phabricator.services.mozilla.com/D163040
2022-12-02 00:53:53 +00:00
Nika Layzell
c6fde75b19 Bug 1443925 - Part 6: Allow specifying Domain when creating content principals, r=ckerschb,bholley
This is required for deserializing nsIPrincipal instances from PrincipalInfo to
be threadsafe, as setting domain with `SetDomain()` is only safe on the main
thread, due to it enumerating and updating JS wrappers.

Differential Revision: https://phabricator.services.mozilla.com/D163036
2022-12-02 00:53:51 +00:00
Nika Layzell
59c29d8099 Bug 1443925 - Part 4: Avoid fetching nsScriptSecurityManager in BasePrincipal::IsSameOrigin, r=ckerschb
The script security manager is not a threadsafe service, but the method just
calls SecurityCompareURIs (which was made threadsafe in part 3). Switch to
calling that directly.

Differential Revision: https://phabricator.services.mozilla.com/D163034
2022-12-02 00:53:50 +00:00
Nika Layzell
e2f6bee4ab Bug 1443925 - Part 2: Make basic manipulation of nsIPrincipal threadsafe, r=ckerschb
This patch only makes the very basics of nsIPrincipal manipulation threadsafe,
such as reference counting, and some trivial methods. The more complex methods
will be made threadsafe in following parts.

Differential Revision: https://phabricator.services.mozilla.com/D163032
2022-12-02 00:53:50 +00:00
Stanca Serban
3811bf75f5 Backed out changeset 02a9e51358f1 (bug 1792138) for causing mochitests failures on browser_ext_windows_create_url.js. CLOSED TREE 2022-11-17 18:38:00 +02:00
Dave Townsend
1573156d9c Bug 1792138: Show the extension's name in permission prompts for opening external links. r=ckerschb,robwu,fluent-reviewers,pbz,flod
In order to handle the content script case correctly we must expose the
contentScriptAddonPolicy to JavaScript. With that we can always see what
extension is trying to perform an action and use its name rather than internal
ID in the dialog.

Differential Revision: https://phabricator.services.mozilla.com/D161282
2022-11-17 14:44:57 +00:00
Stanca Serban
d7154c3939 Backed out changeset e14d08963786 (bug 1792138) for causing mochitest failures on browser_protocol_ask_dialog_permission.js. CLOSED TREE 2022-11-17 14:57:36 +02:00
Dave Townsend
409d66befd Bug 1792138: Show the extension's name in permission prompts for opening external links. r=ckerschb,robwu,fluent-reviewers,pbz,flod
In order to handle the content script case correctly we must expose the
contentScriptAddonPolicy to JavaScript. With that we can always see what
extension is trying to perform an action and use its name rather than internal
ID in the dialog.

Differential Revision: https://phabricator.services.mozilla.com/D161282
2022-11-17 11:08:48 +00:00
nchevobbe
ac16015106 Bug 1778959 - Expose nsIPrincipal.isLoopbackHost. r=bholley.
This will be used in SitePermsAddonInstallRequestPrototype to discriminate permission
requests coming from localhost, where we want to fallback to regular permission prompt.

Depends on D151477

Differential Revision: https://phabricator.services.mozilla.com/D157658
2022-09-30 22:07:18 +00:00
Shane Caraveo
f1212fb1db Bug 1711168 support extension matching in webAccessibleResources r=zombie,smaug,rpl
Differential Revision: https://phabricator.services.mozilla.com/D115114
2022-08-02 17:08:58 +00:00
Butkovits Atila
ae6f4c94fc Backed out 3 changesets (bug 1711168, bug 1773115) for causing failures at test_ext_web_accessible_resources.html. CLOSED TREE
Backed out changeset 703c909eb009 (bug 1773115)
Backed out changeset 902385a7ce60 (bug 1711168)
Backed out changeset 3d061ce03de7 (bug 1711168)
2022-07-27 00:13:26 +03:00
Shane Caraveo
a73cd6df49 Bug 1711168 support extension matching in webAccessibleResources r=zombie,smaug,rpl
Differential Revision: https://phabricator.services.mozilla.com/D115114
2022-07-26 19:39:14 +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
Bobby Holley
ea24f9bbec Bug 1757796 - Permit midi-sysex on localhost. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D140417
2022-03-04 22:55:00 +00:00
Emilio Cobos Álvarez
685321b746 Bug 1755947 - Simplify nsIPrincipal.isSameOrigin(). r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D139030
2022-02-17 18:11:58 +00:00
Tim Huang
b3594081d0 Bug 1724376 - Part 2: Add a RejectForeignAllowList::Check() for principal. r=dimi,pbz,ckerschb
We need a helper function for checking principal if it's in the foreign
allow list.

In this patch we will add a BasePrincipal::IsURIInList() because this is
needed for RejectForeignAllowList::Check().

Differential Revision: https://phabricator.services.mozilla.com/D123804
2021-10-05 15:16:19 +00:00
Tom Schuster
a0128c7638 Bug 1724206 - Use WebExtensionPolicy webidl definition for addonPolicy property on nsIPrincipal. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D121889
2021-08-05 18:16:17 +00:00