Skip to content

Commit 483f8f7

Browse files
author
Mike Nelson
committed
applies the fix mentioned on WP-API#9. I dont think we need to check for multisite because wp_authenticate_spam_check itself does that check
1 parent 6978ef4 commit 483f8f7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

basic-auth.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ function json_basic_auth_handler( $user ) {
3333
* filter during authentication.
3434
*/
3535
remove_filter( 'determine_current_user', 'json_basic_auth_handler', 20 );
36+
remove_filter( 'authenticate', 'wp_authenticate_spam_check', 99 );
3637

3738
$user = wp_authenticate( $username, $password );
3839

3940
add_filter( 'determine_current_user', 'json_basic_auth_handler', 20 );
41+
add_filter( 'authenticate', 'wp_authenticate_spam_check', 99 );
4042

4143
if ( is_wp_error( $user ) ) {
4244
$wp_json_basic_auth_error = $user;

0 commit comments

Comments
 (0)