зеркало из https://github.com/mozilla/pjs.git
XForms Bug 296231 - Allow file:// xforms to submit anywhere. r=darin,aaronr a=mkaply
This commit is contained in:
Родитель
7ea2c8c3ed
Коммит
b13b1cd74c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче