mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 20:24:26 +00:00
Switch to a 403 response code in places where it is more appropriate than a 500 due to permissions errors.
Fixes #10551 Props nacin git-svn-id: https://develop.svn.wordpress.org/trunk@30356 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2312,7 +2312,6 @@ function get_allowed_mime_types( $user = null ) {
|
||||
* @param string $action The nonce action.
|
||||
*/
|
||||
function wp_nonce_ays( $action ) {
|
||||
$title = __( 'WordPress Failure Notice' );
|
||||
if ( 'log-out' == $action ) {
|
||||
$html = sprintf( __( 'You are attempting to log out of %s' ), get_bloginfo( 'name' ) ) . '</p><p>';
|
||||
$redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
|
||||
@@ -2323,7 +2322,7 @@ function wp_nonce_ays( $action ) {
|
||||
$html .= "</p><p><a href='" . esc_url( remove_query_arg( 'updated', wp_get_referer() ) ) . "'>" . __( 'Please try again.' ) . "</a>";
|
||||
}
|
||||
|
||||
wp_die( $html, $title, array('response' => 403) );
|
||||
wp_die( $html, __( 'WordPress Failure Notice' ), 403 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user