WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
242931
refreshing a POSTed page shows multiple warning alerts when the POST refresh has redirections
https://bugs.webkit.org/show_bug.cgi?id=242931
Summary
refreshing a POSTed page shows multiple warning alerts when the POST refresh ...
Juny Tse
Reported
2022-07-19 20:01:05 PDT
Created
attachment 461030
[details]
A NodeJS script to run a web server to demo the issue When the current page comes from a POST request and we refresh the page, an alert "Are you sure you want to send a form again?" will be shown. However, if we click "Yes" and the resent POST request happens to have redirections (for example, login is requested), each of the redirected page will trigger the "Are you sure you want to send a form again?" alert, even it is a GET request. To reproduce: 1. use attached nodejs file reproduce.js, run `node reproduce.js`. 2. use Safari to visit
http://localhost:8000/
3. click "do POST" button in the page, it submits a POST form, renders a new page
http://localhost:8000/do
, 4. refresh the web page, "Are you sure you want to send a form again?" alert is shown, click "Yes" to resend the POST request, the response is a 302 redirection to
http://localhost:8000/redirect
5. issue here: subsequent redirect request "GET
http://localhost:8000/redirect
" also trigger "Are you sure you want to send a form again?" alert. Note that Safari dev inspector cannot show the redirections in step #4 #5, you may need tool like Fiddler/Charles.
Attachments
A NodeJS script to run a web server to demo the issue
(1.02 KB, application/x-javascript)
2022-07-19 20:01 PDT
,
Juny Tse
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-07-26 20:02:15 PDT
<
rdar://problem/97642567
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug