Closed Bug 856923 Opened 10 years ago Closed 10 years ago

Adding erroneous information to manifest breaks other permissions

Categories

(Core :: Permission Manager, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: tofumatt, Assigned: reuben)

Details

Attachments

(1 file, 2 obsolete files)

I'm making a Podcasts app for Firefox OS. It works now, but this bug deals with the manifest failing silently and failing on unrecognized data instead of just ignoring it (which I think is much more developer friendly and sane, especially once optional or new attributes exist).

I think I read a really old bit on permissions for the "storage" bit on packaged apps. It might have included an "access" property for the permission, which at any rate doesn't exist now. However, when I left the permission in the manifest like so:

"storage": {
    "access": "readcreate",
    "description": "Required to store podcast audio files and images."
},
"systemXHR": {
    "description": "Required to GET podcast audio files and images."
}

My app was not only denied storage permission, it was denied systemXHR permission with no warning. If I changed it to:

"storage": {
    "description": "Required to store podcast audio files and images."
},
"systemXHR": {
    "description": "Required to GET podcast audio files and images."
}

everything worked.

I'd argue that extra attributes should be ignored instead of causing all permissions to be denied.
Component: General → Permission Manager
Product: Boot2Gecko → Core
Version: unspecified → Trunk
That's...strange behavior. Gregor - Any ideas?
Flags: needinfo?(anygregor)
Reuben is taking a look.
Thanks Reuben :)
Assignee: nobody → reuben.bmo
Flags: needinfo?(anygregor)
This is probably not the best way to test it, but after spending Too Much Time™ trying to figure out how to write a test for it, I finally gave up and contented myself with this.
Attachment #734138 - Flags: review?(anygregor)
Forgot to exclude the whitespace noise.
Attachment #734138 - Attachment is obsolete: true
Attachment #734138 - Flags: review?(anygregor)
Attachment #734141 - Flags: review?(anygregor)
Added the test to browser_webapps_permissions.js as well.
Attachment #734141 - Attachment is obsolete: true
Attachment #734141 - Flags: review?(anygregor)
Attachment #734227 - Flags: review?(anygregor)
Attachment #734227 - Flags: review?(anygregor) → review+
https://hg.mozilla.org/mozilla-central/rev/01f0d7b85857
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.