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:
John Blackbourn
2014-11-16 06:15:29 +00:00
parent b68026bbfb
commit 4e1e4745ff
17 changed files with 31 additions and 32 deletions

View File

@@ -45,7 +45,7 @@ if ( empty($option_page) ) {
}
if ( !current_user_can( $capability ) )
wp_die(__('Cheatin’ uh?'));
wp_die( __( 'Cheatin’ uh?' ), 403 );
// Handle admin email change requests
if ( is_multisite() ) {
@@ -69,7 +69,7 @@ if ( is_multisite() ) {
}
if ( is_multisite() && !is_super_admin() && 'update' != $action )
wp_die(__('Cheatin’ uh?'));
wp_die( __( 'Cheatin’ uh?' ), 403 );
$whitelist_options = array(
'general' => array( 'blogname', 'blogdescription', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'timezone_string', 'WPLANG' ),