incorrect path in wp.getUsersBlogs used in xmlrpc
|Reported by:||MidnighToker||Owned by:||josephscott|
I believe I have found a bug, whereby the string xmlrpc_url returned by wp.getUsersBlogs is incorrect.
I have wordpress 2.7.1 installed to http://myurl.com/wordpress/
I have moved the index.php file into myurl.com/ and changed the appropriate settings as documented here (http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory).
So far, everything seems to be set up OK.
If I visit http://myurl.com/wordpress/xmlrpc.php?rsd it reports the paths to the xmlrpc.php file correctly, as it does for the link in my index.php (<link rel="pingback" href="http://my.com/wordpress/xmlrpc.php" />)
When I try to connect to my blog from this new client I'm using (wpToGo on Android), its failing to connect.
After some major debugging with the developer, it seems that the app is at first making a correct connection to /wordpress/xmlrpc.php and getting data back, but is then trying to access /xmlrpc.php (which obviously doesn't exist).
After packet sniffing the connection, it seems that wp.getUserBlogs is returning the wrong path for the xmlrpc.php file:
POST /wordpress/xmlrpc.php HTTP/1.1
User-Agent: Apache-HttpClient/UNAVAILABLE (java 1.4)
<?xml version='1.0' ?><methodCall><methodName>wp.getUsersBlogs</methodName><params><param><value><string>thisismyusername</string></value></param><param><value><string>thisismypassword</string></value></param></params></methodCall>HTTP/1.1 200 OK
Date: Sat, 11 Apr 2009 21:20:12 GMT
If I change line 1596 of xmlrpc.php, replacing 'home' with 'siteurl' it all seems to work fine -though I don't know how much damage this bodge will cause.
'xmlrpc' => get_option('siteurl') . '/xmlrpc.php', //s/home/siteurl
Your time is appreciated.