Opened 16 years ago
Last modified 7 years ago
#16482 new defect (bug)
Visibility: password-protected breaks with redirected domains
| Reported by: | monkeyhouse | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Login and Registration | Version: | 3.0.4 |
| Severity: | normal | Keywords: | has-patch dev-feedback |
| Cc: | Focuses: |
Description
Pre-requisite to reproduce: domain.com must redirect to www.domain.com (haven't tested with other subdomains than www, but I'm sure it would be the same).
- password protect a page
- visit domain.com/protected (which redirects to www.domain.com/protected)
- enter password
- something about the redirect OR the way the password is stored/checked is broken; you are redirected to the wp-admin (WordPress login) page.
Sanity check:
- password protect a page
- visit www.domain.com/protected (requiring no subdomain redirect)
- enter password
- successful log-in
Attachments (3)
Change History (14)
#2
@
15 years ago
- Keywords needs-patch added; reporter-feedback removed
Confirmed.
- Visited http://127.0.0.1/wordpress/password-protected-post/
- Entered password, Form submitted to http://localhost/wordpress/wp-pass.php
- Redirected to http://localhost/wordpress/wp-admin/
#3
follow-up:
↓ 4
@
15 years ago
This is caused by wp-post.php using wp_safe_redirect(wp_get_referer()); for the redirection.
Since the referer is set to http://127... instead of http://localhost.. and i'm logged in, it'll redirect me to the WordPress admin.
Ideally, the best way to do this would be to POST the post_id along to wp-pass.php as well, and redirect to get_permalink($post_id);
#4
in reply to: ↑ 3
;
follow-up:
↓ 9
@
15 years ago
- Keywords has-patch added; needs-patch removed
Replying to dd32:
Ideally, the best way to do this would be to POST the post_id along to wp-pass.php as well, and redirect to
get_permalink($post_id);
Taken a slightly different approach by forcing _wp_http_referer to be the permalink. Was unable to quickly reproduce the problem for testing, but this should work.
#5
@
15 years ago
makes a bit more sense there.
Also related, and I'll probably fix at the same time: #16483
#6
@
14 years ago
- Keywords 2nd-opinion added
I was able to recreate the problem with version 3.5-alpha-21751 and installed the patch.
The patch corrected the redirect for me. I am unsure if there may be a better way to handle this but it works.
#9
in reply to: ↑ 4
@
13 years ago
- Component Template → Login and Registration
Replying to duck_:
Replying to dd32:
Ideally, the best way to do this would be to POST the post_id along to wp-pass.php as well, and redirect to
get_permalink($post_id);
Taken a slightly different approach by forcing _wp_http_referer to be the permalink. Was unable to quickly reproduce the problem for testing, but this should work.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Tried the procedure you describe and it works fine for me. Are you using server rewrite rules to do the non-www -> www redirect?