Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 7 years ago

#6340 closed defect (bug) (fixed)

XProfile Field-Group name save issues

Reported by: johnjamesjacoby's profile johnjamesjacoby Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.4 Priority: high
Severity: major Version:
Component: Extended Profile Keywords: needs-patch needs-unit-tests
Cc:

Description

When saving an XProfile field group name with single quotes, the quotes are saved as slashed.

Editing and saving again slashes the name again, introducing more and more slashes.

Change History (13)

#1 @johnjamesjacoby
10 years ago

  • Keywords needs-unit-tests added

This appears to be... accidentally intentional. It has been using incorrect validation and sanitization functions since its inception. Will likely need a few different unit tests to confirm the existing bug, backwards compatibility, and any fixes.

#2 @johnjamesjacoby
10 years ago

In 9678:

XProfile: Move field-group name & description save() sanitization into filters for consistency between save method & saving via the admin UI. See #6340.

#3 @johnjamesjacoby
10 years ago

In 9679:

XProfile: Introduce save_xprofile_group_name test group, for testing slashed data issues. See #6340.

#4 @johnjamesjacoby
10 years ago

In 9680:

XProfile: Use assertSame() vs. assertEquals() in save_xprofile_group_name test group. See #6340.

#5 @johnjamesjacoby
10 years ago

In 9681:

XProfile: Move field save() sanitization into filters for consistency between save method & saving via the admin UI. See #6340.

#6 @johnjamesjacoby
10 years ago

In 9682:

XProfile: Validate default-visibility and allow-custom-visibility metadata before saving. See #6340.

#7 follow-up: @DJPaul
10 years ago

Can we start using the third parameter of in_array? It makes it do a type strict comparison and while that may not help in these instances, I think it's a valuable thing to do as we write new code.

#8 in reply to: ↑ 7 @johnjamesjacoby
10 years ago

Replying to DJPaul:

Can we start using the third parameter of in_array? It makes it do a type strict comparison and while that may not help in these instances, I think it's a valuable thing to do as we write new code.

Yes, we can and should.

#9 @johnjamesjacoby
10 years ago

  • Owner set to johnjamesjacoby
  • Status changed from new to assigned

#10 @johnjamesjacoby
10 years ago

  • Milestone changed from 2.3 to 2.4

Bumping this to 2.4.

We will need a database upgrade routine to fix this.

Also, ugh.

#11 @DJPaul
9 years ago

I did some fixes for this in r10239. While there's no DB tidy-up routine, if/when someone edits the field group, it'll fix up that particular group.

#12 @DJPaul
9 years ago

  • Milestone changed from 2.4 to Future Release

#13 @DJPaul
7 years ago

  • Milestone changed from Awaiting Contributions to 2.4
  • Resolution set to fixed
  • Status changed from assigned to closed

This was fixed adequately some years ago.

Note: See TracTickets for help on using tickets.