Closed Bug 1217267 Opened 9 years ago Closed 9 years ago

Remember my choice is available for hosted permissions (once you choose, no way to change permission)

Categories

(Firefox OS Graveyard :: Gaia::System::System UI, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:2.5+)

RESOLVED FIXED
blocking-b2g 2.5+

People

(Reporter: pauljt, Assigned: julienw)

Details

(Keywords: qaurgent)

Attachments

(1 file)

I just noticed that remember my choice is enabled for geolocation, even for websites. Once the user makes a choice, the choice is persisted forever.The only way to clear it is to "clear cookies and cache" in the settings->browser privacy.

This means:
- a user that chooses "deny" always, that website will never be able to use geolocation again.
- if you accept always for a http site, any MITM attacker can now access geolocation without a prompt

This affect desktop-notifications permission too, and my guess is that it will be all web permissions, except for the getUserMedia ones, since they have a special prompt.

[Blocking Requested - why for this release]:
For the reasons highlighted above I think this needs to block. Breaks web functionality and user security.
Agree we should block as P1 -- should not be a hard fix but there is too many nested |if| blocks unfortunately.

FYI we already got https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/permission_manager.js#L384-L389
blocking-b2g: 2.5? → 2.5+
Component: Gaia::System → Gaia::System::System UI
Priority: -- → P1
Is this a regression?
Keywords: qaurgent
I can try to get a quick look and see if I can fix it to relieve the System team's load :)
Assignee: nobody → felash
Note that contrary to Desktop, the user choice is kept for some time even if the user doesn't check "remember my choice". But rebooting makes the choice appear again, if the user didn't check the "remember my choice" checkbox.

If I check the "remember my choice" then the choice is kept accross reboots. I couldn't find a way to remove the permission. I tried on 1.3 and it seems we had the same issue at that time already, so I don't think it's a regression.
Comment on attachment 8678124 [details] [review]
[gaia] julienw:1217267-permission-websites > mozilla-b2g:master

hey Tim,

what do you think ?

I thought this could make a difference for fullscreen permission requests from apps... but actually there is no permission requests from apps :) So I think we're good.

I filed bug 1217852 to bring the feature back in a consistent way -- Stéphanie told me it should be part of the new security model anyway.
Attachment #8678124 - Flags: review?(timdream)
Comment on attachment 8678124 [details] [review]
[gaia] julienw:1217267-permission-websites > mozilla-b2g:master

The actual boolean is send back here:

https://github.com/julienw/gaia/blob/1217267-permission-websites/apps/system/js/permission_manager.js#L397-L403

There is just too many statements flipping here and there in this file, so I assume you have made the right effort to ensure we send the remember bit back when we show the UI, and we don't otherwise.

IMHO whether or not to allow to user to remember this security decision should be something given in Gecko. Gaia System is just the UI here. Do we know the where reverent Firefox Desktop/Mobile code is and whether or not Gecko could expose that instead?
Attachment #8678124 - Flags: review?(timdream) → review+
(In reply to Tim Guan-tin Chien [:timdream] (please needinfo) from comment #8)
> Comment on attachment 8678124 [details] [review]
> [gaia] julienw:1217267-permission-websites > mozilla-b2g:master
> 
> The actual boolean is send back here:
> 
> https://github.com/julienw/gaia/blob/1217267-permission-websites/apps/system/
> js/permission_manager.js#L397-L403

yeah; we already have a "!detail.isApp" here so I think it's set to "false" initially in the case we're interested in here.

> 
> There is just too many statements flipping here and there in this file, so I
> assume you have made the right effort to ensure we send the remember bit
> back when we show the UI, and we don't otherwise.

When this comes from web apps, with the patch we just don't show the "remember" UI at all when this comes from web content or pinned web content.

I also checked that after installing the app we still get the "remember" UI and that it works.

> 
> IMHO whether or not to allow to user to remember this security decision
> should be something given in Gecko. Gaia System is just the UI here. Do we
> know the where reverent Firefox Desktop/Mobile code is and whether or not
> Gecko could expose that instead?

I suspect this discussion should be part of the new security model talk. Please raise your concerns in bug 1217852.
master: https://github.com/mozilla-b2g/gaia/commit/c5771bbdfea430abd867d286d9f22b7d7ea8af62

Thanks for the review!
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: