From 4c57e19bdfb3f1a00eb2daeb79f38d79b8f099af Mon Sep 17 00:00:00 2001 From: Mike Nelson Date: Mon, 7 Mar 2016 14:48:04 -0800 Subject: [PATCH] applies the fix mentioned on https://github.com/WP-API/Basic-Auth/issues/9. I dont think we need to check for multisite because wp_authenticate_spam_check itself does that check --- basic-auth.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/basic-auth.php b/basic-auth.php index 805918c..7e02807 100644 --- a/basic-auth.php +++ b/basic-auth.php @@ -33,10 +33,12 @@ function json_basic_auth_handler( $user ) { * filter during authentication. */ remove_filter( 'determine_current_user', 'json_basic_auth_handler', 20 ); + remove_filter( 'authenticate', 'wp_authenticate_spam_check', 99 ); $user = wp_authenticate( $username, $password ); add_filter( 'determine_current_user', 'json_basic_auth_handler', 20 ); + add_filter( 'authenticate', 'wp_authenticate_spam_check', 99 ); if ( is_wp_error( $user ) ) { $wp_json_basic_auth_error = $user;