Skip to:

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's profile DJPaul Owned by:
Milestone: 1.5 Priority: minor
Severity: Version:
Component: Core Keywords:


bp_core_redirect() is a wrapper for wp_redirect(). There is an issue when BuddyPress tries to redirect a URL such as "…/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)

#1 @DJPaul
13 years ago

This might be related to #1978

#2 @DJPaul
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.

#3 @djpaul
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [4386]) URL-encode member name part of URL when BP_ENABLE_USERNAME_COMPATIBILITY_MODE is set. Fixes #2670

Note: See TracTickets for help on using tickets.