[wp-trac] [WordPress Trac] #54987: Check if 'user_nicename' is not too long after the 'pre_user_nicename' filter

WordPress Trac noreply at wordpress.org
Sun Mar 13 04:17:55 UTC 2022


#54987: Check if 'user_nicename' is not too long after the 'pre_user_nicename'
filter
--------------------------------------+----------------------------
 Reporter:  SergeyBiryukov            |       Owner:  davidbaumwald
     Type:  defect (bug)              |      Status:  reviewing
 Priority:  normal                    |   Milestone:  6.0
Component:  Users                     |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  good-first-bug has-patch  |     Focuses:
--------------------------------------+----------------------------

Comment (by SergeyBiryukov):

 Thanks for the patches! It looks like most of them have changes that are a
 bit out of scope for this ticket:

 * [attachment:54987.patch] introduces a duplicate check instead of moving
 the existing one.
 * [attachment:54987.2.patch] moves the existing check, but no longer
 throws a WP_Error if the nicename is too long.
 * [attachment:54987.diff] has some formatting changes and renames a
 variable, which does not seem necessary here. It also adds validation for
 `$user_url`, but it was already added in [52650] / #44107.
 * [https://github.com/WordPress/wordpress-develop/pull/2244 PR #2244]
 introduces a new check that `user_nicename` cannot be empty. I think this
 would be better discussed in a separate ticket.

 For this ticket, I was thinking of just moving the existing check after
 the filter, like in [attachment:"54987.2.diff"].

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


More information about the wp-trac mailing list