back out strict document.domain checking (bug 154930)

git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@127927 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dveditz%netscape.com
2002-08-23 07:18:53 +00:00
parent 65bf1a4cc0
commit cb23f7cc3b

View File

@@ -556,25 +556,7 @@ nsScriptSecurityManager::CheckSameOriginDOMProp(JSContext *aCx,
return NS_ERROR_FAILURE;
if (isSameOrigin)
{ // If either the subject or the object has changed its principal by
// explicitly setting document.domain then the other must also have
// done so in order to be considered the same origin. This prevents
// DNS spoofing based on document.domain (154930)
nsCOMPtr<nsIAggregatePrincipal> subjectAgg(do_QueryInterface(aSubject, &rv));
NS_ENSURE_SUCCESS(rv, rv);
PRBool subjectSetDomain = PR_FALSE;
subjectAgg->WasCodebaseChanged(&subjectSetDomain);
nsCOMPtr<nsIAggregatePrincipal> objectAgg(do_QueryInterface(aObject, &rv));
NS_ENSURE_SUCCESS(rv, rv);
PRBool objectSetDomain = PR_FALSE;
objectAgg->WasCodebaseChanged(&objectSetDomain);
// If both or neither explicitly set their domain, allow the access
if (!(subjectSetDomain || objectSetDomain) ||
(subjectSetDomain && objectSetDomain))
return NS_OK;
}
return NS_OK;
// Allow access to about:blank
nsCOMPtr<nsICodebasePrincipal> objectCodebase(do_QueryInterface(aObject));