[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
Thu Jun 4 15:58:37 UTC 2015


#14601: wp_new_comment method doesn't allow passed in values for IP and user-agent
--------------------------------+--------------------------
 Reporter:  mrutz               |       Owner:  rachelbaker
     Type:  enhancement         |      Status:  accepted
 Priority:  normal              |   Milestone:  4.3
Component:  Comments            |     Version:  3.0.1
 Severity:  normal              |  Resolution:
 Keywords:  rest-api has-patch  |     Focuses:
--------------------------------+--------------------------
Changes (by rachelbaker):

 * milestone:  Future Release => 4.3


Comment:

 [https://core.trac.wordpress.org/attachment/ticket/14601/14601.3.diff
 14601.3.diff] updates @wonderboymusic's previous patch and filters the
 passed input for the `$commentdata['comment_author_IP']` and
 `$commentdata['comment_agent']`.  I also went ahead and added several unit
 tests.

 As noted in my [https://core.trac.wordpress.org/ticket/14601#comment:16
 comment above] for the WP REST API when creating comments the local
 $_SERVER data wouldn't contain the accurate IP or user agent values.

 Milestoning this for 4.3 with my fingers crossed.

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


More information about the wp-trac mailing list