Ticket #1355 (closed defect: wontfix)

Opened 19 months ago

Last modified 17 months ago

Poster IP should be possible to set through XMLRPC

Reported by: master5o1 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

xmlrpc.php Download (128.4 KB) - added by master5o1 19 months ago.
fully patched xmlrpc.php from trunk
xmlrpc.diff Download (302 bytes) - added by master5o1 19 months ago.
the changes from xmlrpc.php trunk and the patched xmlrpc.php that is attached to this ticket.

Change History

fully patched xmlrpc.php from trunk

the changes from xmlrpc.php trunk and the patched xmlrpc.php that is attached to this ticket.

  • Cc jason@… added
  • Type changed from defect to enhancement
  • Type changed from enhancement to defect
  • Version changed from 1.0.2 to 1.1-alpha
  • Milestone set to 1.0.3

Please can someone take a look at this?

comment:5 follow-up: ↓ 6   cnorris2317 months ago

  • 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.

Last edited 17 months ago by cnorris23 (previous) (diff)

comment:6 in reply to: ↑ 5   master5o117 months ago

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.

Last edited 17 months ago by mdawaffe (previous) (diff)
Note: See TracTickets for help on using tickets.