<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>11420</bug_id>
          
          <creation_ts>2006-10-26 07:11:16 -0700</creation_ts>
          <short_desc>Can not change the action, then submit, the form currently being submitted</short_desc>
          <delta_ts>2013-01-30 11:24:24 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Forms</component>
          <version>420+</version>
          <rep_platform>Mac (PowerPC)</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>https://www.ebank.hsbc.com.au</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>39021</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="James Mitchell">james.w.mitchell</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>dglazkov</cc>
    
    <cc>dtrebbien</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>49589</commentid>
    <comment_count>0</comment_count>
    <who name="James Mitchell">james.w.mitchell</who>
    <bug_when>2006-10-26 07:11:16 -0700</bug_when>
    <thetext>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.
...
&lt;script type=&quot;text/javascript&quot;&gt;
// change the form.action and resubmit
function doStuff() { document.form1.action = &quot;http://404/&quot;; document.form1.submit(); }
&lt;/script&gt;
...
&lt;form name=&quot;form1&quot; action=&quot;doStuff();&quot;.../&gt;
...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49591</commentid>
    <comment_count>1</comment_count>
      <attachid>11222</attachid>
    <who name="James Mitchell">james.w.mitchell</who>
    <bug_when>2006-10-26 07:14:25 -0700</bug_when>
    <thetext>Created attachment 11222
Example file reproducing the issue</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4321</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-07-19 05:30:41 -0700</bug_when>
    <thetext>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 &quot;http://404/?text1=1&amp;text2=2&quot;. Works in Firefox.

Note: clicking the Submit button works fine</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4298</commentid>
    <comment_count>3</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-19 07:31:14 -0700</bug_when>
    <thetext>Not a regression as this occurs with Safari 2.0.4 with original WebKit on Mac OS X 10.4.10 (8R218).

</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>11222</attachid>
            <date>2006-10-26 07:14:25 -0700</date>
            <delta_ts>2006-10-26 07:14:25 -0700</delta_ts>
            <desc>Example file reproducing the issue</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>872</size>
            <attacher name="James Mitchell">james.w.mitchell</attacher>
            
              <data encoding="base64">PGh0bWw+CjxoZWFkPgo8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCI+CjwhLS0KdmFyIGlz
U3VibWl0ID0gZmFsc2U7CmZ1bmN0aW9uIHZhbGlkYXRlKCkKewoJLy8gY29weSB0aGUgdmFsdWUg
ZnJvbSB0aGUgZmlyc3QgZm9ybSB0byB0aGUgc2Vjb25kIChoaWRkZW4pCglkb2N1bWVudC5mb3Jt
Mi50ZXh0MS52YWx1ZSA9IGRvY3VtZW50LmZvcm0xLnRleHQxLnZhbHVlOwoKCWRvY3VtZW50LmZv
cm0yLmFjdGlvbiA9ICdodHRwOi8vNDA0Lyc7CgkKCWlzU3VibWl0ID0gdHJ1ZTsKCWRvY3VtZW50
LmZvcm0yLnN1Ym1pdCgpOwkKCglkb2N1bWVudC5mb3JtMS5yZXNldCgpOwoJZG9jdW1lbnQuZm9y
bTIucmVzZXQoKTsKCWRvY3VtZW50LmZvcm0xLnRleHQxLmRpc2FibGVkID0gdHJ1ZTsKCWRvY3Vt
ZW50LmZvcm0yLnRleHQyLmRpc2FibGVkID0gdHJ1ZTsKfQovLy0tPgo8L3NjcmlwdD4KPC9oZWFk
Pgo8Ym9keT4KCTxmb3JtIG5hbWU9ImZvcm0xIgoJICBhY3Rpb249ImphdmFzY3JpcHQ6ZG9jdW1l
bnQuZm9ybTIudGV4dDIuZm9jdXMoKTsiPgoJCTxpbnB1dCB0eXBlPSJ0ZXh0IiBuYW1lPSJ0ZXh0
MSIgdmFsdWU9IiIvPgoJPC9mb3JtPgoJCgk8Zm9ybSBuYW1lPSJmb3JtMiIgYWN0aW9uPSJqYXZh
c2NyaXB0OnZhbGlkYXRlKCk7IgoJICBvbnN1Ym1pdD0icmV0dXJuICFpc1N1Ym1pdCI+CgkJPGlu
cHV0IHR5cGU9ImhpZGRlbiIgbmFtZT0idGV4dDEiLz4KCQk8aW5wdXQgdHlwZT0idGV4dCIgbmFt
ZT0idGV4dDIiIHZhbHVlPSIiLz4KCTwvZm9ybT4KCQoJPGEgbmFtZT0iYSIgaHJlZj0iamF2YXNj
cmlwdDp2YWxpZGF0ZSgpIgoJICBvbmNsaWNrPSJyZXR1cm4gIWlzU3VibWl0Ij5zdWJtaXQ8L2E+
CjwvYm9keT4KPC9odG1sPgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>