Bug 416534: Clean up cross-site xmlhttprequest security checks. r/sr=peterv
git-svn-id: svn://10.0.0.236/trunk@246608 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -395,6 +395,18 @@ public:
|
||||
|
||||
JSContext* GetSafeJSContext();
|
||||
|
||||
/**
|
||||
* Utility method for comparing two URIs. For security purposes, two URIs
|
||||
* are equivalent if their schemes, hosts, and ports (if any) match. This
|
||||
* method returns true if aSubjectURI and aObjectURI have the same origin,
|
||||
* false otherwise.
|
||||
*/
|
||||
static PRBool SecurityCompareURIs(nsIURI* aSourceURI, nsIURI* aTargetURI);
|
||||
|
||||
static nsresult
|
||||
ReportError(JSContext* cx, const nsAString& messageTag,
|
||||
nsIURI* aSource, nsIURI* aTarget);
|
||||
|
||||
private:
|
||||
|
||||
// GetScriptSecurityManager is the only call that can make one
|
||||
@@ -420,10 +432,6 @@ private:
|
||||
nsIPrincipal*
|
||||
doGetSubjectPrincipal(nsresult* rv);
|
||||
|
||||
static nsresult
|
||||
ReportError(JSContext* cx, const nsAString& messageTag,
|
||||
nsIURI* aSource, nsIURI* aTarget);
|
||||
|
||||
nsresult
|
||||
CheckPropertyAccessImpl(PRUint32 aAction,
|
||||
nsAXPCNativeCallContext* aCallContext,
|
||||
@@ -540,16 +548,9 @@ private:
|
||||
nsISecurityPref* securityPref);
|
||||
|
||||
|
||||
/**
|
||||
* Utility method for comparing two URIs. For security purposes, two URIs
|
||||
* are equivalent if their schemes, hosts, and ports (if any) match. This
|
||||
* method returns true if aSubjectURI and aObjectURI have the same origin,
|
||||
* false otherwise.
|
||||
*/
|
||||
PRBool SecurityCompareURIs(nsIURI* aSourceURI, nsIURI* aTargetURI);
|
||||
|
||||
/* encapsulate the file comparison rules */
|
||||
PRBool SecurityCompareFileURIs(nsIURI* aSourceURI, nsIURI* aTargetURI);
|
||||
static PRBool SecurityCompareFileURIs(nsIURI* aSourceURI,
|
||||
nsIURI* aTargetURI);
|
||||
|
||||
#ifdef XPC_IDISPATCH_SUPPORT
|
||||
// While this header is included outside of caps, this class isn't
|
||||
@@ -590,7 +591,8 @@ private:
|
||||
PRPackedBool mXPCDefaultGrantAll;
|
||||
static const char sXPCDefaultGrantAllName[];
|
||||
#endif
|
||||
PRInt32 mFileURIOriginPolicy;
|
||||
|
||||
static PRInt32 sFileURIOriginPolicy;
|
||||
|
||||
static nsIIOService *sIOService;
|
||||
static nsIXPConnect *sXPConnect;
|
||||
|
||||
Reference in New Issue
Block a user