Opened 14 years ago
Closed 13 years ago
#2670 closed defect (bug) (fixed)
bp_core_redirect and BP_ENABLE_USERNAME_COMPATIBILITY_MODE don't always work
Reported by: | DJPaul | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | minor |
Severity: | Version: | ||
Component: | Core | Keywords: | |
Cc: |
Description
bp_core_redirect() is a wrapper for wp_redirect(). There is an issue when BuddyPress tries to redirect a URL such as "example.com/members/email@…/profile/edit/group/1/" when BP_ENABLE_USERNAME_COMPATIBILITY_MODE is set. This URL happens when you go to your profile and click "edit."
The preg_replace in wp_sanitize_redirect() strips the @ which breaks our redirect. What about using user_nicename in the URLs instead of user_login?
Change History (3)
#2
@
13 years ago
- Priority changed from major to minor
I don't know what I was referring to when I wrote in the ticket (about user_nicename). Either way, I am not sure if @ is a valid character for the path part of URLs. If it is, then wp_sanitize_redirect() should be updated, otherwise we will need to urlencode $username in bp_core_get_user_domain() -- I've tested the latter and it works fine.
This might be related to #1978