Open Bug 1967168 Opened 7 months ago Updated 3 days ago

cannot add exceptions not to purge cookies for particular site

Categories

(GeckoView :: General, enhancement)

Firefox 138
enhancement

Tracking

(Not tracked)

People

(Reporter: nvhorst, Unassigned)

Details

User Agent: Mozilla/5.0 (Android 13; Mobile; rv:138.0) Gecko/138.0 Firefox/138.0

Steps to reproduce:

Go to settings > site settings > exceptions

Actual results:

No way to add exception directly or after loading a page and trying to add it when asking for cookies.

Expected results:

The list should have possibility of adding exception (for example not to wipe cookies when quitting the app)

The Bugbug bot thinks this bug should belong to the 'Firefox for Android::Settings' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Settings
Product: Firefox → Firefox for Android

The severity field is not set for this bug.
:royang, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(royang)
Severity: -- → S3
Type: defect → enhancement
Flags: needinfo?(royang)

hi!
i would like to work on this one, it's a feature that i would very much like in firefox android, but i've been wondering: should it really be managed from the "site settings"?

in firefox desktop, you can manage the exceptions next to "Delete cookies and site data when Firefox is closed"
i thought it would be the same for firefox android, what do you think?

in any case, for the deletion proper, i think i've found this file in which it can take place org/mozilla/fenix/settings/deletebrowsingdata/DeleteAndQuit.kt
but i don't know much about the rest of the code and i would like some guidance over this, especially regarding the preference keys related to this list of exceptions, or a key in about:config as a first implementation, or something

Flags: needinfo?(royang)
Status: UNCONFIRMED → NEW
Ever confirmed: true

ok here's what i'll try to do : i'll try to add a key/value in about:config to store a comma-separated list of websites exceptions (just like firefox desktop does) then get this list and filter them from the deletion in org/mozilla/fenix/settings/deletebrowsingdata/DeleteAndQuit.kt

and then we can go from there, wdyt?

Flags: needinfo?(emanuellclaudiu)

As I understand it, the current API only support specifying which host to clear cookie on. It doesn't support passing in hosts you want to omit clearing cookies. here

I'll move this to GeckoView since we will need support form GeckoView first.

Component: Settings → General
Flags: needinfo?(royang)
Product: Firefox for Android → GeckoView

oh yeah my bad i didn't dig enough :)
i'll try to take a look in geckoview then, to see if i can make the change myself (not sure when though)

Flags: needinfo?(emanuellclaudiu)

ok it seems like the limitation is actually in the android webkit api
i think the CookieManager can be tricked to work, but i don't see yet how to deal with the WebStorage for example

then again, the other implementation of the engine, GeckoEngine, seems to lead into some JS code, and then i'm getting lost, because i can't find any mention of Services.clearData.deleteData for example

still working on this one, but right now i need to focus on other things
soon i'll post here a summary of my investigations so far :)
cheers!

hi! sorry but i don't have the time to work on that anymore :(
here's the last conversation that i had on the fenix room about that : https://chat.mozilla.org/#/room/#fenix:mozilla.org/$eyqRg4PI2JKfDQo1Gj8W4bz4IOzH-unUeaeDPV3NT8M

good luck!

You need to log in before you can comment on or make changes to this bug.