Opened 11 years ago
Closed 11 years ago
#29248 closed defect (bug) (fixed)
Browsers may cache 302 redirect to install.php
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | 3.9.2 |
Component: | Upgrade/Install | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
- Upload the Wordpress files and fill in the wp-config.php information
- Visit the Wordpress URL in your browser; you are redirected to /wp-admin/install.php
- Proceed with the installation
- Visit the Wordpress URL in your browser.
Firefox, at least, caches the 302 redirect and keeps sending you to /wp-admin/install.php, acting as if you haven't installed Wordpress at all. Restarting Firefox clears the 302 cache, after which it works perfectly.
I'm not sure what the best solution is - ideally it should be redirected in a way that doesn't cache the result, if possible - but at the very least, the installation page shouldn't be acting as if Wordpress isn't installed and asking you for installation details.
Attachments (2)
Change History (9)
#1
in reply to:
↑ description
@
11 years ago
#2
@
11 years ago
Hm, I see. Every time I'm redirected to /wp-admin/install.php, I'm seeing the original installation page and form; only when I do a hard refresh of that page does it change to the 'Wordpress is already installed' message. So it's caching both the redirect, and the install.php output.
#3
@
11 years ago
- Keywords has-patch added
I think adding nocache_headers() to wp_not_installed() should resolve this.
Related: #21745.
#4
@
11 years ago
- Milestone changed from Awaiting Review to 4.0
This makes sense. We send no-cache headers on the login screen, database upgrade screens, and on the rest of the admin area.
#5
@
11 years ago
wp_not_installed()
is called unconditionally, so 29248.patch doesn't work as expected.
See 29248.2.patch.
Replying to smerriman:
We already detect that: tags/3.9.2/src/wp-admin/install.php#L142.