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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user