[XForms] Allow chrome:// to submit anywhere. Bug 316931, r=doronr+aaronr, patch by surkov@dc.baikal.ru

This commit is contained in:
allan%beaufour.dk 2005-11-24 14:24:15 +00:00
parent 9feebd2a16
commit 8671300fe6

View File

@ -965,9 +965,13 @@ nsXFormsSubmissionElement::CheckSameOrigin(nsIURI *aBaseURI, nsIURI *aTestURI)
// if same origin is required, default to false
allowSubmission = PR_FALSE;
// if we don't replace the instance, we allow file:// to submit data anywhere
// if we don't replace the instance, we allow file:// and chrome://
// to submit data anywhere
if (!mIsReplaceInstance) {
aBaseURI->SchemeIs("file", &allowSubmission);
if (!allowSubmission) {
aBaseURI->SchemeIs("chrome", &allowSubmission);
}
}
// let's check the permission manager