Opened 2 years ago
Closed 19 months ago
#17243 closed defect (bug) (fixed)
wp_login_form: default for redirect leads to 404 on site in sub-folders
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.3 |
| Component: | Template | Version: | 3.0 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | zanematthew@… |
Description
When using wp_login_form in a site in a sub-folder (eg. /wordpress), the default redirect parameter (site_url( $_SERVERREQUEST_URI? )) causes the redirect to duplicate the sub-folder in the url eg: http://example.com/wordpress/wordpress/
Replicated on 3.1.1 and 3.2 bleeding on 2 separate servers.
Attachments (1)
Change History (8)
comment:3
ZaneMatthew — 21 months ago
- Cc zanematthew@… added
comment:4
SergeyBiryukov — 21 months ago
- Milestone changed from Awaiting Review to 3.3
<input type="hidden" name="redirect_to" value="' . esc_attr( $args['redirect'] ) . '" />
Thinking that should be esc_url().
Or, if it should remain esc_attr() (and I don't think it should), then this patch should esc_url_raw() what we build from $_SERVER.
Note: See
TracTickets for help on using
tickets.

$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']