Fix overbroad getter/setter access check to apply only to scripted getters/setters; fix wrong object class name in error messages (198660, r=mstoltz, sr=jst, a=asa).

git-svn-id: svn://10.0.0.236/trunk@142248 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
brendan%mozilla.org
2003-05-09 00:40:50 +00:00
parent 377f892599
commit 409a6a96a8
2 changed files with 19 additions and 2 deletions

View File

@@ -457,9 +457,9 @@ nsScriptSecurityManager::CheckObjectAccess(JSContext *cx, JSObject *obj,
JSObject* target = JSVAL_IS_PRIMITIVE(*vp) ? obj : JSVAL_TO_OBJECT(*vp);
// Do the same-origin check -- this sets a JS exception if the check fails.
// Pass the target object's class name, as we have no class-info for it.
// Pass the parent object's class name, as we have no class-info for it.
nsresult rv =
ssm->CheckPropertyAccess(cx, target, JS_GetClass(cx, target)->name, id,
ssm->CheckPropertyAccess(cx, target, JS_GetClass(cx, obj)->name, id,
nsIXPCSecurityManager::ACCESS_GET_PROPERTY);
if (NS_FAILED(rv))