зеркало из https://github.com/mozilla/pjs.git
Fix for bug 428229 (Unable to override addEventListener), add security check to nsGlobalWindow::AddEventListener. r=mrbkap, sr=jst.
--HG-- extra : rebase_source : a5a35ee7301d276ef8194a639515f42f78e26328
This commit is contained in:
Родитель
ce3f461016
Коммит
05cbb19476
|
@ -6566,6 +6566,11 @@ nsGlobalWindow::AddEventListener(const nsAString& aType,
|
|||
"aWantsUntrusted to PR_FALSE or make the aWantsUntrusted "
|
||||
"explicit by making optional_argc non-zero.");
|
||||
|
||||
if (IsOuterWindow() && mInnerWindow &&
|
||||
!nsContentUtils::CanCallerAccess(mInnerWindow)) {
|
||||
return NS_ERROR_DOM_SECURITY_ERR;
|
||||
}
|
||||
|
||||
nsIEventListenerManager* manager = GetListenerManager(PR_TRUE);
|
||||
NS_ENSURE_STATE(manager);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче