• Resolved kojix

    (@kojix)


    We are using the Simple LDAP Authentication plugin to authenticate users into our blog network without problems.

    Today, we decided to try the iOS app for wordpress, and we see that the autentication process fails (user/passwd incorrect)…

    The XML-RPC publish propertie is set to on…

    I’ve tried to put an error_log message into the authentication plugin, and i can see that the plugin is not executed for the xmlrpc authentication process.

    I check the xmlrpc.php file, and I see that the authentication is performed by the user_pass_ok function, wich calls wp_authenticate (hooked by the ldap plugin), so I don’t understand what is happening…

    Does the xmlrpc authentication procedure bypass the plugins??

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter kojix

    (@kojix)

    No answers?
    Any clue on what could be wrong?

    I’ve tried to set a password on the database for the test user (by default the plugin set a random one), and then I can log in…

    Thanks in advance…

    This is fixed in the 3.1 version (at least in my testing).

    This fix should fix the xmlrpc issue:

    https://wpmu-ldap.svn.sourceforge.net/viewvc/wpmu-ldap/trunk/ldap/lib/wpmu_ldap.functions.php?r1=116&r2=115&pathrev=116

    tianon

    (@tianon)

    I’m also using the “Simple LDAP Authentication” plugin, and am using 3.1, but have the same issue. Can login from the site using LDAP, but not from XML-RPC. Local users work fine in XML-RPC.

    tianon

    (@tianon)

    Applying the following patch to wp-includes/class-wp-xmlrpc-server.php solved our problem:

    diff --git wp-includes/class-wp-xmlrpc-server.php wp-includes/class-wp-xmlrpc-server.php
    index 5e9bbd4..9a24187 100644
    --- wp-includes/class-wp-xmlrpc-server.php
    +++ wp-includes/class-wp-xmlrpc-server.php
    @@ -182,6 +182,7 @@ class wp_xmlrpc_server extends IXR_Server {
                            return false;
                    }
    
    +               do_action_ref_array('wp_authenticate', array(&$username, &$password));
                    $user = wp_authenticate($username, $password);
    
                    if (is_wp_error($user)) {

    Just needed to process “login” in the same way as user.php to allow Simple LDAP Authentication’s wp_authenticate plugin to do its dirty work.

    Thread Starter kojix

    (@kojix)

    I tried with 3.0 and it wasn’t working, but now with 3.1 it works fine!!!

    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘XML-RPC authentication fails with LDAP plugin…’ is closed to new replies.