Bug 1691357 - Add UserCounter and deprecate warnning message for form submission via untrusted submit event; r=smaug,flod
Differential Revision: https://phabricator.services.mozilla.com/D104070
This commit is contained in:
@@ -578,6 +578,11 @@ nsresult HTMLFormElement::PostHandleEvent(EventChainPostVisitor& aVisitor) {
|
||||
// to forget it and the form element will build a new one
|
||||
mPendingSubmission = nullptr;
|
||||
}
|
||||
if (!aVisitor.mEvent->IsTrusted()) {
|
||||
// Warning about the form submission is from untrusted event.
|
||||
OwnerDoc()->WarnOnceAbout(
|
||||
DeprecatedOperations::eFormSubmissionUntrustedEvent);
|
||||
}
|
||||
DoSubmit(aVisitor.mDOMEvent);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user