Add same-origin checks in a few DOM methods. Patch by me and jst.

b=156452, r=jst/me, sr=bz, a=pending


git-svn-id: svn://10.0.0.236/trunk@125294 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sicking%bigfoot.com
2002-07-16 13:09:15 +00:00
parent 3495eca2d7
commit 7ef44d6e76
18 changed files with 270 additions and 47 deletions

View File

@@ -47,6 +47,9 @@
#include "ProcessorState.h"
#include "nsContentCID.h"
#include "ExprParser.h"
#include "nsDOMError.h"
#include "txURIUtils.h"
NS_IMPL_ADDREF(nsXPathEvaluator)
NS_IMPL_RELEASE(nsXPathEvaluator)
@@ -91,6 +94,9 @@ nsXPathEvaluator::CreateNSResolver(nsIDOMNode *aNodeResolver,
nsIDOMXPathNSResolver **aResult)
{
NS_ENSURE_ARG(aNodeResolver);
if (!URIUtils::CanCallerAccess(aNodeResolver))
return NS_ERROR_DOM_SECURITY_ERR;
*aResult = new nsXPathNSResolver(aNodeResolver);
NS_ENSURE_TRUE(*aResult, NS_ERROR_OUT_OF_MEMORY);