[wp-trac] [WordPress Trac] #19614: get_avatar should ignore whitespace in email addresses

WordPress Trac wp-trac at lists.automattic.com
Mon Dec 19 19:46:46 UTC 2011


#19614: get_avatar should ignore whitespace in email addresses
-------------------------+------------------------------
 Reporter:  evansolomon  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------------------

Comment (by evansolomon):

 Replying to [comment:2 johnbillion]:
 > If the email address needs to be valid (in your case they do as you're
 using them to display Gravatars) then you should be validating the email
 addresses when they're entered.

 I don't think there's a common use case for preferring invalid emails,
 which makes me think it should be done universally.  If that's the case,
 requiring a plugin or theme author to strip always-wrong characters from
 every email input seems inefficient.  That is what I interpret validating
 them on input to mean.

 > What if an email address contains other disallowed characters? Why are
 you only stripping whitespace?

 Whitespace is an obvious and simple case to protect against.  It was also
 the cause of a problem I just encountered.   I started with the low-
 hanging fruit, making this more robust would be great.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19614#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list