[wp-trac] [WordPress Trac] #23231: preprocess_comment should get the normalised comment data

WordPress Trac noreply at wordpress.org
Thu May 29 15:07:22 UTC 2014


#23231: preprocess_comment should get the normalised comment data
-------------------------------------------------+-----------------------
 Reporter:  westi                                |       Owner:  dkotter
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  low                                  |   Milestone:  4.0
Component:  Comments                             |     Version:  3.5
 Severity:  minor                                |  Resolution:
 Keywords:  westi-like has-patch good-first-bug  |     Focuses:
-------------------------------------------------+-----------------------

Comment (by dkotter):

 Hmm.. yeah. That's probably (hopefully?) an edge case and seems more like
 someone shooting themselves in the foot, trying to change the user ID of a
 comment, but it is a possibility and something we should probably try and
 avoid.

 The only thought I had was to keep the normalization part above the
 filter, setting both user_id and user_ID there, then after the filter,
 check if those values are equal. If they're not, then one of those was
 changed in the filter so at that point, normalize the data again, so we
 don't end up with two different values. The problem I see there is there's
 not a way I could think of to tell which one was changed and which one
 wasn't, so as you mention, if someone changes user_id and not user_ID, and
 we normalize back to user_ID, they lose their changes.

 So not sure if there is a good answer here. We don't want two separate
 ID's set, but not sure if we want to "guess" on what value (either user_id
 or user_ID) someone actually wanted to use.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/23231#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list