Closed
Bug 871262
Opened 12 years ago
Closed 12 years ago
Fix rooting hazards in the CAPS code
Categories
(Core :: Security: CAPS, defect)
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file)
14.24 KB,
patch
|
till
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #748529 -
Flags: review?(tschneidereit)
Comment 1•12 years ago
|
||
Comment on attachment 748529 [details] [diff] [review]
Patch (v1)
Review of attachment 748529 [details] [diff] [review]:
-----------------------------------------------------------------
Nice! Feel free to ignore my nits, if you'd rather not touch this again.
::: caps/src/nsScriptSecurityManager.cpp
@@ +634,5 @@
> if (NS_FAILED(rv))
> return rv;
>
> if (securityLevel.level == SCRIPT_SECURITY_UNDEFINED_ACCESS)
> {
whitespace
@@ +661,5 @@
>
> case SCRIPT_SECURITY_SAME_ORIGIN_ACCESS:
> {
> nsCOMPtr<nsIPrincipal> principalHolder;
> + if(jsObject)
if (
@@ +1758,1 @@
> nsIXPCSecurityManager::ACCESS_GET_PROPERTY,
whitespace
@@ +2051,5 @@
>
> #ifdef DEBUG
> // static
> nsIPrincipal*
> +nsScriptSecurityManager::old_doGetObjectPrincipal(JSObject *aObj_,
Any reason not to leave this as `aObj` and use `obj` below?
(If the answer is "yes: lots of changes would be required", I would totally understand.)
@@ +2268,5 @@
> }
>
> nsresult
> nsScriptSecurityManager::CheckXPCPermissions(JSContext* cx,
> + nsISupports* aObj, JSObject* aJSObject_,
Same here: I'd prefer keeping `aJSObject` and introducing `jsObject`, as you did elsewhere.
Attachment #748529 -
Flags: review?(tschneidereit) → review+
Assignee | ||
Comment 2•12 years ago
|
||
Comment on attachment 748529 [details] [diff] [review]
Patch (v1)
Review of attachment 748529 [details] [diff] [review]:
-----------------------------------------------------------------
::: caps/src/nsScriptSecurityManager.cpp
@@ +2051,5 @@
>
> #ifdef DEBUG
> // static
> nsIPrincipal*
> +nsScriptSecurityManager::old_doGetObjectPrincipal(JSObject *aObj_,
The reason is laziness! But I'll make this change as you requested.
Assignee | ||
Comment 3•12 years ago
|
||
Comment 4•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in
before you can comment on or make changes to this bug.
Description
•