Bug 12417 - REGRESSION: "Are you sure you want to send a form again?" sheet is displayed twice when resubmitting a form with a modified file
Summary: REGRESSION: "Are you sure you want to send a form again?" sheet is displayed ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Normal
Assignee: Nobody
URL: http://validator.w3.org/#validate-by-...
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2007-01-26 10:15 PST by David Kilzer (:ddkilzer)
Modified: 2019-06-01 15:38 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2007-01-26 10:15:54 PST
Summary:

When reloading a page that was the result of a form submission with a file upload(?), the "Are you sure you want to send a form again?" sheet is displayed twice (and must be confirmed twice) before the form is resubmitted.  I suppose this could be considered a dummy-check security feature, but it's also kind of annoying and a regression from shipping Safari.

Steps to reproduce:

1. Open Safari/WebKit.
2. Visit URL:  http://validator.w3.org/#validate-by-upload
3. Select an HTML file to upload (doesn't have to pass validation).
4. Click "Check".
5. After validation page loads, click "Reload" button in Safari.

Expected results:

The "Are you sure you want to send a form again?" sheet should be displayed once so that clicking "Send" resubmits the form.

Actual results:

The "Are you sure you want to send a form again?" sheet is displayed twice, and you must click "Send" twice to resubmit the form.

Regression:

This is a regression from shipping Safari 2.0.4 (419.3) on Mac OS X 10.4.8 (8N1037).

Tested with a locally-built debug build of WebKit r19151 with Safari 2.0.4 (419.3) on Mac OS X 10.4.8 (8N1037).

Notes:

Not tested on Leopard (yet).
Comment 1 David Kilzer (:ddkilzer) 2007-01-26 11:16:07 PST
(In reply to comment #0)
> Steps to reproduce:
> 
> 1. Open Safari/WebKit.
> 2. Visit URL:  http://validator.w3.org/#validate-by-upload
> 3. Select an HTML file to upload (doesn't have to pass validation).
> 4. Click "Check".
> 5. After validation page loads, click "Reload" button in Safari.

I left out an important step:  You must modify the file (and save it back to disk) before attempting to reload the form in order to see two sheets.

1. Open Safari/WebKit.
2. Visit URL:  http://validator.w3.org/#validate-by-upload
3. Select an HTML file to upload (doesn't have to pass validation).
4. Click "Check".
5. Edit the file that was uploaded in Step 3 and resave it.
6. Click "Reload" button in Safari.

Note that if you get an ASSERTION FAILED crash while trying to reproduce this, that is Bug 9920.

Comment 2 David Kilzer (:ddkilzer) 2007-01-26 12:32:37 PST
(In reply to comment #0)
> Regression:
> 
> This is a regression from shipping Safari 2.0.4 (419.3) on Mac OS X 10.4.8
> (8N1037).
> 
> Tested with a locally-built debug build of WebKit r19151 with Safari 2.0.4
> (419.3) on Mac OS X 10.4.8 (8N1037).

Note that on shipping Safari, the original file contents are resent (not the contents of the changed file) when the form is resent.
Comment 3 Mark Rowe (bdash) 2007-01-28 15:50:31 PST
<rdar://problem/4960112>
Comment 4 Thomas Steinacher 2007-02-10 11:35:19 PST
When using redirects after submitting the form, the message will be sometimes displayed three times or even more (using multiple redirects).

How to reproduce:
1. Create the following "form.php" on your server:
<p>Hit submit and then reload the page.</p>
<form action="form.php" method="post">
<input type="submit" name="submit" value="submit">
</form>
2. Load the "form.php" in your nightly WebKit and click the submit button.
3. Add the following line at the beginnig of your "form.php":
<?php sleep(3); if ($_POST['submit']) header('Location: form2.php'); ?>
4. Press Apple+R in WebKit
5. The message will appear twice, and a third time after 3 seconds
Comment 5 David Kilzer (:ddkilzer) 2007-02-12 01:45:04 PST
Revision r18011 seems rather suspicious in the context of this bug.  Found it while reviewing r18004:18012 per Bug 12690 Comment #12.

http://trac.webkit.org/projects/webkit/changeset/18011

Comment 6 Anders Carlsson 2007-02-14 16:14:11 PST
Committed revision 19632.