[wp-meta] [Making WordPress.org] #1462: Broken Gravatar on Trac

Making WordPress.org noreply at wordpress.org
Thu Nov 17 22:12:44 UTC 2016


#1462: Broken Gravatar on Trac
----------------------------+---------------------
 Reporter:  SergeyBiryukov  |       Owner:
     Type:  defect          |      Status:  closed
 Priority:  normal          |   Milestone:
Component:  Trac            |  Resolution:  fixed
 Keywords:                  |
----------------------------+---------------------

Comment (by mdawaffe):

 Replying to [comment:13 ocean90]:
 > @stephdau The regex is fine because dots are not allowed in
 user_nicename. That this will produce a wrong gravatar for a few people is
 a known issue and can be fixed case-by-case, see
 https://wordpress.slack.com/archives/meta-tracdev/p1477221873000365 for a
 similar report.

 Trying to look things up by user_nicename from Trac seems broken.

 * grav-redirect.php looks up the user by user_login first, then falls back
 to user_nicename.
 * user_login is what we display publicly on Trac (as far as I can tell).
 * Trac's `wporg_sanitize_user_nicename()` cannot determine a user_nicename
 from a user_login. Only DB access can do that. For example, in this case
 (as in the one referenced at https://wordpress.slack.com/archives/meta-
 tracdev/p1477221873000365), there is a user_nicename "conflict":
 `user_login=henry.wright, user_nicename=henrywright` v.
 `user_login=henrywright, user_nicename=henrywright-1`. In the case
 discussed on Slack, both accounts were (supposedly) owned by the same
 person, so we could edit the DB at will. That's not always going to be the
 case.

 In this specific instance, if grav-redirect.php looked things up by
 user_nicename first (then fell back to user_login), we'd get the correct
 Gravatar, but that will just break things in some other way (if
 `user_login=henrywright` creates a Trac ticket, for example).

 It seems like we should just look things up by user_login all the time:
 it's what Trac uses internally and publicly and is always predictable.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/1462#comment:15>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list