Open Bug 776794 Opened 12 years ago Updated 2 years ago

Statically enumerate permissions grantable by PContentPermissionRequest

Categories

(Core :: DOM: Core & HTML, task, P5)

task

Tracking

()

blocking-basecamp -

People

(Reporter: cjones, Unassigned)

References

Details

(Whiteboard: [WebAPI:P3])

Right now we send a raw string permission.  Instead, we should create a union of dynamically-grantable permissions and send that.

I hope we have code at a lower level that rejects dynamic requests for telephony, e.g., but we shouldn't play with fire here.
Blocks: 746280
No longer blocks: 776790
blocking-basecamp: --- → ?
Whiteboard: [blocked-on-input]
I forget why we're blocked on input here.  Can anyone enlighten me?
Assignee: nobody → jonas
blocking-basecamp: ? → +
Per cjones, needs Jonas' analysis to determine if there's work here or not.
Whiteboard: [blocked-on-input]
Sending this over to Dougt who is looking at all the prompting stuff.
Assignee: jonas → doug.turner
Is your vision that the parent process tells the child process "here are the 4 permissions you have for right now"?
From my reading of the code, it looked like PContentPermissionRequest was behaving as expected, for dynamically-grantable permissions.  For example, it is behaving as expected for granting non-certified permissions like offline storage.

HOWEVER, we should not even allow the possiblity of content processes accidentally requesting permissions like sms or telephony through PContentPermissionRequest.  We should be summarily denying dynamic requests for those permissions at a lower level, but it makes me nervous to even expose that interface.

Statically enumerating the grantable permissions, through an IPDL |union|, would eliminate this problem entirely.
Summary: Lock down PContentPermissionRequest → Statically enumerate permissions grantable by PContentPermissionRequest
(In reply to Doug Turner (:dougt) from comment #4)
> Is your vision that the parent process tells the child process "here are the
> 4 permissions you have for right now"?

We should be doing that somewhere else, yes.
perfectly clear now.  thanks!
Whiteboard: [WebAPI:P3]
Keywords: feature
i do not think this should be blocking.
blocking-basecamp: + → ?
blocking-basecamp: ? → -
I don't quite understand why we want to do this. A PContentPermissionRequest *should* only have the ability to bring up a dialog to the user, which isn't really a sensitive thing if we do it for the "wrong" type of permission.

And more importantly, it *should* only have the ability to do that for permissions that are listed as PROMPT in the permissionmanager for that app, or for permissions that any app/webpage has permission to prompt about (like geolocation). Which means that a PContentPermissionRequest *should* only be able to bring up permission dialogs for things that the content process has permission to prompt about.

So it seems ok to me if someone sends a totally invalid string here.

Of course, I'm not sure if this matches what the current implementation does. But if not we should fix that either way.
unassigning things that I am not working on.
Assignee: doug.turner → nobody
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.