Closed
Bug 1033453
Opened 10 years ago
Closed 10 years ago
Remember my permissions for PROMPT_ACTION composed permission (permission-read, permission-write) WebAPIs are lost on an app update
Categories
(Core Graveyard :: DOM: Apps, defect)
Tracking
(blocking-b2g:2.0+, firefox31 wontfix, firefox32 fixed, firefox33 fixed, b2g-v2.0 fixed, b2g-v2.1 fixed)
People
(Reporter: amac, Assigned: amac)
References
Details
(Keywords: dataloss)
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
amac
:
review+
|
Details | Diff | Splinter Review |
Steps:
1. Install a packaged app calling out contacts: {access: read} support
2. Access the contacts API and remember my permissions to allow
3. Update the packaged app on the server
4. Check for updates (manual or automatic)
5. Update the app
6. Check the settings app perm UI or try to access contacts in the updated app
Expected:
The contacts-read permission should be to allow, not ask. So we should retain permissions remembered on an update.
Actual:
The contacts-read permission reverts to ask. So remembering my permissions for allow is lost on an update of the app.
Assignee | ||
Comment 1•10 years ago
|
||
The problem here is that I was checking the original permission name (instead of the expanded permission name) to see if the user had granted the permission previously. That works for normal permissions, but won't work for composed permissions, or permissions that are substitued.
Added a test case for this also... better late than never I guess :)
Try run is at https://tbpl.mozilla.org/?tree=Try&rev=356616c57606
Assignee | ||
Comment 2•10 years ago
|
||
Cancelled the try... now I remember why that test wasn't written, contacts-read is privileged and the test installs web apps... Will try with a substituted permission instead and update the patch.
Assignee | ||
Comment 3•10 years ago
|
||
And bar that also... there are only three web prompt permissions, which were the ones I used on the original patch... and none of them are composed in any way.
Comment 4•10 years ago
|
||
Do we need this for v2.0 (for the mobile Loop app)?
Flags: needinfo?(oteo)
Flags: needinfo?(amac)
Assignee | ||
Comment 5•10 years ago
|
||
Assignee: nobody → amac
Attachment #8449545 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8449652 -
Flags: review?(fabrice)
Assignee | ||
Comment 6•10 years ago
|
||
(In reply to Maire Reavy [:mreavy] (Plz needinfo me, PTO on Jun 23) from comment #4)
> Do we need this for v2.0 (for the mobile Loop app)?
Yes, this is needed for Loop. It's also needed for any privileged app that uses the contacts, device storage, or any other privileged explicit API that has subpermissions (readonly, readwrite...).
Since without this we're losing user information, I think this should be a blocker. Otherwise let me know and I'll ask for approval (the patch is really just changing a parameter in a call, so it's very low risk anyway).
blocking-b2g: --- → 2.0?
Flags: needinfo?(amac)
Updated•10 years ago
|
Flags: needinfo?(oteo)
Updated•10 years ago
|
blocking-b2g: 2.0? → 2.0+
Comment 7•10 years ago
|
||
Comment on attachment 8449652 [details] [diff] [review]
v2. Now with tests that actually pass. I hope
Review of attachment 8449652 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/apps/src/PermissionsTable.jsm
@@ +342,5 @@
> certified: PROMPT_ACTION
> + },
> + // This permission doesn't actually grant access to
> + // anything. It exists only to check the correctness
> + // of web prompt composed permissions.
nit: add " in tests."
Attachment #8449652 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 8•10 years ago
|
||
r=fabrice
Attachment #8449652 -
Attachment is obsolete: true
Attachment #8452265 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 9•10 years ago
|
||
Flags: in-testsuite+
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Comment 11•10 years ago
|
||
status-b2g-v2.0:
--- → fixed
status-b2g-v2.1:
--- → fixed
status-firefox31:
--- → wontfix
status-firefox32:
--- → fixed
status-firefox33:
--- → fixed
Comment 12•10 years ago
|
||
> Steps:
>
> 1. Install a packaged app calling out contacts: {access: read} support
Hi Reporter,
Could you provide the packaged app's file or name for me to verify this bug?
Thank you!
Flags: needinfo?(amac.bug)
Assignee | ||
Comment 13•10 years ago
|
||
You can try with the FirefoxOS loop app, for example: https://github.com/mozilla-b2g/firefoxos-loop-client/
Flags: needinfo?(amac.bug)
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•