Changeset 35366 for trunk/src/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 10/23/2015 04:45:10 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r35170 r35366 45 45 */ 46 46 public $error; 47 48 /** 49 * Flags that the user authentication has failed in this instance of wp_xmlrpc_server. 50 * 51 * @access protected 52 * @var bool 53 */ 54 protected $auth_failed = false; 47 55 48 56 /** … … 252 260 } 253 261 254 $user = wp_authenticate($username, $password); 255 256 if (is_wp_error($user)) { 262 if ( $this->auth_failed ) { 263 $user = new WP_Error( 'login_prevented' ); 264 } else { 265 $user = wp_authenticate( $username, $password ); 266 } 267 268 if ( is_wp_error( $user ) ) { 257 269 $this->error = new IXR_Error( 403, __( 'Incorrect username or password.' ) ); 270 271 // Flag that authentication has failed once on this wp_xmlrpc_server instance 272 $this->auth_failed = true; 258 273 259 274 /**
Note: See TracChangeset
for help on using the changeset viewer.