[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
Wed Jun 24 02:40:07 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:
--------------------------------+--------------------------
Comment (by dd32):
Replying to [comment:29 rmccue]:
> Replying to [comment:28 dd32]:
> > @rachelbaker I'm curious as to this - other than a CLI use-case,
REMOTE_ADDR should be set correctly, and if not, should be set in the
bootstrap for the API.. same goes for the user agent..
>
> If you're programmatically creating comments on behalf of a user (e.g.
custom commenting system backed by WP), and your requests to the API
aren't on the client, the IP and UA will refer to the client making the
request, not the original client.
That's a valid use-case for this, but I struggle to see how that's related
to the rest api then, as the rest api comment endpoints shouldn't really
allow that stuff to get set by default (IMHO)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/14601#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list