Closed
Bug 1238723
Opened 9 years ago
Closed 9 years ago
tab child needs to use default user context id when handling permissions.
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: huseby, Assigned: huseby)
References
Details
(Whiteboard: [userContextId][OA])
Attachments
(1 file, 1 obsolete file)
1.31 KB,
patch
|
huseby
:
review+
|
Details | Diff | Splinter Review |
in the file dom/ipc/ContentChild.cpp there's code for creating a principal when handling an add permission message:
> 2413 nsAutoCString originNoSuffix;
> 2414 PrincipalOriginAttributes attrs;
> 2415 attrs.PopulateFromOrigin(permission.origin, originNoSuffix);
> 2416
> 2417 nsCOMPtr<nsIURI> uri;
> 2418 nsresult rv = NS_NewURI(getter_AddRefs(uri), originNoSuffix);
> 2419 NS_ENSURE_SUCCESS(rv, true);
> 2420
> 2421 nsCOMPtr<nsIPrincipal> principal = mozilla::BasePrincipal::CreateCodebasePrincipal(uri, attrs);
because this is dealing with a permission, we need to change the PrincipalOriginAttribute object to a DefaultContextOriginAttributes object to force the user context to the default one.
Assignee | ||
Comment 1•9 years ago
|
||
This appears to work correctly.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Assignee | ||
Comment 2•9 years ago
|
||
Going to reopen to add some asserts in here just in case.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Assignee | ||
Comment 3•9 years ago
|
||
Assignee | ||
Comment 4•9 years ago
|
||
Comment on attachment 8717725 [details] [diff] [review]
Bug_1238723.patch
this one is good to go.
Attachment #8717725 -
Flags: review?(jonas)
Comment on attachment 8717725 [details] [diff] [review]
Bug_1238723.patch
Review of attachment 8717725 [details] [diff] [review]:
-----------------------------------------------------------------
Maybe add a comment staying that we're only doing this since we don't yet support permissions on a per-user-context basis.
Attachment #8717725 -
Flags: review?(jonas) → review+
Assignee | ||
Comment 6•9 years ago
|
||
already r+ by :sicking. this adds the comment he requested and adds a better commit message.
Attachment #8717725 -
Attachment is obsolete: true
Attachment #8737428 -
Flags: review+
Assignee | ||
Comment 7•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Whiteboard: [userContextId]
Keywords: checkin-needed
Comment 9•9 years ago
|
||
bugherder |
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Assignee | ||
Updated•9 years ago
|
Whiteboard: [userContextId] → [userContextId][OA]
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•