Always throw an exception, even if we cannot reach a principal. bug 409514, r+sr+a=jst
git-svn-id: svn://10.0.0.236/trunk@242389 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
43bc9abcc2
commit
3d6fa4c653
@ -800,7 +800,7 @@ nsScriptSecurityManager::CheckPropertyAccessImpl(PRUint32 aAction,
|
||||
{
|
||||
objectPrincipal = doGetObjectPrincipal(cx, aJSObject);
|
||||
if (!objectPrincipal)
|
||||
return NS_ERROR_FAILURE;
|
||||
rv = NS_ERROR_DOM_SECURITY_ERR;
|
||||
}
|
||||
else if(aTargetURI)
|
||||
{
|
||||
@ -813,8 +813,9 @@ nsScriptSecurityManager::CheckPropertyAccessImpl(PRUint32 aAction,
|
||||
NS_ERROR("CheckPropertyAccessImpl called without a target object or URL");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
rv = CheckSameOriginDOMProp(subjectPrincipal, objectPrincipal,
|
||||
aAction, aTargetURI != nsnull);
|
||||
if(NS_SUCCEEDED(rv))
|
||||
rv = CheckSameOriginDOMProp(subjectPrincipal, objectPrincipal,
|
||||
aAction, aTargetURI != nsnull);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user