Bug 11420 - Can not change the action, then submit, the form currently being submitted
Summary: Can not change the action, then submit, the form currently being submitted
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 420+
Hardware: Mac (PowerPC) OS X 10.4
: P2 Normal
Assignee: Nobody
URL: https://www.ebank.hsbc.com.au
Keywords:
Depends on:
Blocks: 39021
  Show dependency treegraph
 
Reported: 2006-10-26 07:11 PDT by James Mitchell
Modified: 2013-01-30 11:24 PST (History)
3 users (show)

See Also:


Attachments
Example file reproducing the issue (872 bytes, text/html)
2006-10-26 07:14 PDT, James Mitchell
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Mitchell 2006-10-26 07:11:16 PDT
In other words, assume there exists a form with ID form1. Submitting form1 executes a script which changes the action of form1 (form1.action), then submits the form (form1.submit). I suppose one could look at is as resubmitting/redirecting the form?

The browsers I have tested that do allow the action to be changed are IE 6 (Windows) and FireFox 2.0 (Mac). The browsers that do not allow this are Safari 420+ nightly (Mac) and Opera 9.02 (Mac)

Steps to Replicate:
On the affected page, enter a garbage value into Personal Banking Number (PBN), press enter/return key and enter another garbage value into Personal Identification Number (PIN), finally pressing the enter/return key to submit the form. At this point, the browser was intended to submit the form to another page, and this can be confirmed by clicking on the Logon button/link. Note, both input fields are disabled after the form was meant to be submitted to another page, as is the Logon button to prevent multple form submission.

A simple test can be drawn up as follows.
...
<script type="text/javascript">
// change the form.action and resubmit
function doStuff() { document.form1.action = "http://404/"; document.form1.submit(); }
</script>
...
<form name="form1" action="doStuff();".../>
...
Comment 1 James Mitchell 2006-10-26 07:14:25 PDT
Created attachment 11222 [details]
Example file reproducing the issue
Comment 2 Alexey Proskuryakov 2007-07-19 05:30:41 PDT
Confirmed with r24182.

Steps to reproduce:
1) Open the attached test case.
2) Type something in the input fields.
3) Press Enter (Return).

Results: the inputs are reset and disabled; the form is not submitted takes place.
Expected results: the URL should change to something like "http://404/?text1=1&text2=2". Works in Firefox.

Note: clicking the Submit button works fine
Comment 3 David Kilzer (:ddkilzer) 2007-07-19 07:31:14 PDT
Not a regression as this occurs with Safari 2.0.4 with original WebKit on Mac OS X 10.4.10 (8R218).