Ticket #37569: 37569.patch
File 37569.patch, 830 bytes (added by , 8 years ago) |
---|
-
src/wp-includes/rest-api.php
587 587 return true; 588 588 } 589 589 590 // Send a refreshed nonce in header. 591 $wp_rest_server->send_header( 'X-WP-Nonce', wp_create_nonce( 'wp_rest' ) ); 592 590 593 // Check the nonce. 591 594 $result = wp_verify_nonce( $nonce, 'wp_rest' ); 592 595 593 596 if ( ! $result ) { 594 return new WP_Error( 'rest_cookie_ invalid_nonce', __( 'Cookie nonce is invalid' ), array( 'status' => 403 ) );597 return new WP_Error( 'rest_cookie_expired_nonce', __( 'Cookie nonce expired' ), array( 'status' => 403 ) ); 595 598 } 596 599 597 // Send a refreshed nonce in header.598 $wp_rest_server->send_header( 'X-WP-Nonce', wp_create_nonce( 'wp_rest' ) );599 600 600 return true; 601 601 } 602 602