XForms Bug 296231 - Allow file:// xforms to submit anywhere. r=darin,aaronr a=mkaply
git-svn-id: svn://10.0.0.236/trunk@174707 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
0c2b71ebc2
commit
075bbef7b5
@ -812,8 +812,18 @@ PRBool
|
||||
nsXFormsSubmissionElement::CheckSameOrigin(nsIURI *aBaseURI, nsIURI *aTestURI)
|
||||
{
|
||||
// We require same-origin for replace="instance" or XML submission
|
||||
if (mFormat & (ENCODING_XML | ENCODING_MULTIPART_RELATED) || mIsReplaceInstance)
|
||||
return nsXFormsUtils::CheckSameOrigin(aBaseURI, aTestURI);
|
||||
if (mFormat & (ENCODING_XML | ENCODING_MULTIPART_RELATED) || mIsReplaceInstance) {
|
||||
|
||||
// if we don't replace the instance, we allow file:// to send the data
|
||||
PRBool schemeIsFile = PR_FALSE;
|
||||
|
||||
if (!mIsReplaceInstance) {
|
||||
aBaseURI->SchemeIs("file", &schemeIsFile);
|
||||
}
|
||||
|
||||
if (!schemeIsFile)
|
||||
return nsXFormsUtils::CheckSameOrigin(aBaseURI, aTestURI);
|
||||
}
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user