From cb23f7cc3bfd52aecbd7e33b02ca26a07db1dfd9 Mon Sep 17 00:00:00 2001 From: "dveditz%netscape.com" Date: Fri, 23 Aug 2002 07:18:53 +0000 Subject: [PATCH] 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 --- mozilla/caps/src/nsScriptSecurityManager.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/mozilla/caps/src/nsScriptSecurityManager.cpp b/mozilla/caps/src/nsScriptSecurityManager.cpp index 2d20579d720..c8e98d9e7b1 100644 --- a/mozilla/caps/src/nsScriptSecurityManager.cpp +++ b/mozilla/caps/src/nsScriptSecurityManager.cpp @@ -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 subjectAgg(do_QueryInterface(aSubject, &rv)); - NS_ENSURE_SUCCESS(rv, rv); - PRBool subjectSetDomain = PR_FALSE; - subjectAgg->WasCodebaseChanged(&subjectSetDomain); - - nsCOMPtr 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 objectCodebase(do_QueryInterface(aObject));