Ticket #1355 (closed defect: wontfix)
Poster IP should be possible to set through XMLRPC
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Back-end | Version: | 1.0.2 |
| Severity: | normal | Keywords: | reporter-feedback |
| Cc: | jason@… |
Description
Through my findings developing bbPress Mobile, I have discovered that it is necessary to be able to set the poster's IP through the XMLRPC api.
I have included a patched xmlrpc.php from trunk at the time of this ticket being opened.
More details can be found in this forum topic:
http://bbpress.org/forums/topic/xmlrpc-and-a-posters-ip-address
Attachments
Change History
-
attachment
xmlrpc.php
added
-
attachment
xmlrpc.diff
added
the changes from xmlrpc.php trunk and the patched xmlrpc.php that is attached to this ticket.
- Keywords reporter-feedback added; xmlrpc,ip removed
- Version changed from 1.1-alpha to 1.0.2
This definitely seems to be a fairly large edge case, so I wouldn't expect to get this added. Also, it looks like there are plenty of hooks for you to make this happen without any changes to the core code. Look at do_action( 'bb_xmlrpc_call', 'bb.newTopic' ) and do_action( 'bb_xmlrpc_call', 'bb.newPost' ). You are free to pass whatever information you'd like in your XML-RPC call, it's just that bb_newTopic and bb_newPost only check for certain bits. Using the above hooks, you should be able to retrieve the poster_ip param and then override the $_SERVER['REMOTE_ADDR'] from there. Please report back if this doesn't work.
Also, you should leave the Version data as the version you first found the problem. In this case, 1.0.2.
Replying to cnorris23:
I have tried using the do_action hooks (bb_xmlrpc_call and bb_xmlrpc_call_authenticated).
But I am unsure as to how to access the $args or $structure variables within the functions that the hooks are in.
Not being able to access $args[2] means that I can't get the 'poster_ip' from the XMLRPC data using my xmlrpc client info plugin (http://bbpress.org/plugins/topic/xmlrpc-client-info/).
- Status changed from new to closed
- Resolution set to wontfix
- Milestone 1.0.3 deleted
This is not a core issue. Core should always accept the requester's IP.
To address this issue, please consider doing it the "standard" way: when sending the XML-RPC request, include a http://en.wikipedia.org/wiki/X-Forwarded-For header. Then make a bbPress plugin to handle that header and encourage your users to install it.
fully patched xmlrpc.php from trunk