Closed Bug 292960 Opened 20 years ago Closed 20 years ago

Possible to submit forms in cached presentations

Categories

(Core :: DOM: Navigation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: bryner)

References

(Depends on 1 open bug, )

Details

Attachments

(1 file)

See testcase in URL field.
this crashes for me (linux).
Hmm... I can't reproduce the crash, and it should be sorta-fixed for reasons similar to bug 292961 (we'll still build the form submission, but not send it; not sure where we drop the data). Do you have a talkback incident ID, Ian?
TB5604335Z and TB5604301G.
Ah. You have password manager enabled... care to file that as a separate bug blocking bug 274784? And probably blocked by this bug? We shouldn't even be getting into the password manager code.
Blocks: 293171
Depends on: 293173
Depends on: 293175
Blocks: 293176
When I attempt to reproduce the problem using the testcase, I get (in the console of a debug build): WARNING: NS_ENSURE_TRUE(handler) failed, file c:/builds/mozilla/bfcache/mozilla/ content/html/content/src/nsFormSubmission.cpp, line 1223 JavaScript error: , line 0: uncaught exception: [Exception... "Component returne d failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLFormElement.submit]" n sresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: https://bugzill a.mozilla.org/attachment.cgi?id=181895 :: go :: line 9" data: no] It may be that something else can happen if the form we attempt to submit contains a password field. I'll do some more testing.
I filed the crash as bug 293176. Note that we shouldn't be trying to notify form submit observers of a submit we don't plan to do....
Ok, since the password manager is created lazily, you have to have gone to a page with a password field first. Then I can reproduce the crash with the testcase.
This also adds a bit of bulletproofing in nsPasswordManager.
Assignee: nobody → bryner
Status: NEW → ASSIGNED
Attachment #182817 - Flags: superreview?(bzbarsky)
Attachment #182817 - Flags: review?(bzbarsky)
Comment on attachment 182817 [details] [diff] [review] don't notify form submit observers if there is no link handler r+sr=bzbarsky. If the password manager change is relevant to the other one too, could you make it there as well, please?
Attachment #182817 - Flags: superreview?(bzbarsky)
Attachment #182817 - Flags: superreview+
Attachment #182817 - Flags: review?(bzbarsky)
Attachment #182817 - Flags: review+
Comment on attachment 182817 [details] [diff] [review] don't notify form submit observers if there is no link handler a=brendan@mozilla.org for 1.8b2. /be
Attachment #182817 - Flags: approval1.8b2+
checked in, with appropriate bulletproofing in extensions/wallet/src/nsWalletService as well.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Component: History: Session → Document Navigation
QA Contact: history.session → docshell
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: