[wp-trac] [WordPress Trac] #14601: wp_new_comment method doesn't allow passed in values for IP and user-agent

WordPress Trac noreply at wordpress.org
Sat May 4 11:28:35 UTC 2013


#14601: wp_new_comment method doesn't allow passed in values for IP and user-agent
---------------------------------+--------------------
 Reporter:  mrutz                |       Owner:
     Type:  enhancement          |      Status:  new
 Priority:  normal               |   Milestone:  3.6
Component:  Comments             |     Version:  3.0.1
 Severity:  normal               |  Resolution:
 Keywords:  has-patch 3.2-early  |
---------------------------------+--------------------

Comment (by DrewAPicture):

 Yeah, it's 5:30 am, and I wasn't thinking. I meant to say in comment:6
 that we could probably use `filter_var()` and `FILTER_VALIDATE_IP` to
 check `$commentdata['comment_author_IP']` on the way in. Something like
 {{{
 if ( ! isset( $commentdata['comment_author_IP'] ) && filter_var(
 $commentdata['comment_author_IP'], FILTER_VALIDATE_IP ) )
 }}}

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


More information about the wp-trac mailing list