Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2618 closed defect (bug) (fixed)

bp_core_set_uri_globals() should urldecode() path parts

Reported by: mdawaffe's profile mdawaffe Owned by:
Milestone: 1.2.6 Priority: normal
Severity: Version:
Component: Core Keywords:
Cc: mdawaffe

Description

If a user has a user_login with a space in it, for example, and BP_ENABLE_USERNAME_COMPATIBILITY_MODE is enabled, bp_core_set_uri_globals() will report the username as "Blah%20Foo" instead of "Blah Foo".

Attached fixes that one place, but there may be other similar places that need urldecoding.

Attachments (1)

urldecode.user_login.diff (788 bytes) - added by mdawaffe 12 years ago.

Download all attachments as: .zip

Change History (7)

#1 @DJPaul
12 years ago

  • Milestone changed from 1.3 to 1.2.6

#2 follow-up: @DJPaul
12 years ago

Attached patch is against trunk. mdawaffe, does this affect the 1.2 branch? (I assume it does)

#3 in reply to: ↑ 2 @mdawaffe
12 years ago

  • Cc mdawaffe added

Replying to DJPaul:

Attached patch is against trunk. mdawaffe, does this affect the 1.2 branch? (I assume it does)

I don't know. I only have access to a trunk install to test.

Here's an example in the wild:
http://profiles.wordpress.org/users/mdawaffe/ works as expected
http://profiles.wordpress.org/users/Hiroaki%20Miyashita/ does not

#4 @johnjamesjacoby
12 years ago

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

(In [3233]) Fixes #2618 (1.2 branch) props mdawaffe

#5 @johnjamesjacoby
12 years ago

(In [3234]) Fixes #2618 (trunk) props mdawaffe

#6 @johnjamesjacoby
12 years ago

This is the only place where the username is directly referenced as a URI part.

If this crops up anywhere else (or needs to) we should reconsider putting this in as a filter and running it mandatory on every pass, since this function checks the DB directly against the value passed.

Fixed in branch and trunk.

Note: See TracTickets for help on using tickets.