mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 12:14:25 +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:
@@ -739,7 +739,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
|
||||
public function step_2() {
|
||||
check_admin_referer('custom-header-upload', '_wpnonce-custom-header-upload');
|
||||
if ( ! current_theme_supports( 'custom-header', 'uploads' ) )
|
||||
wp_die( __( 'Cheatin’ uh?' ) );
|
||||
wp_die( __( 'Cheatin’ uh?' ), 403 );
|
||||
|
||||
if ( empty( $_POST ) && isset( $_GET['file'] ) ) {
|
||||
$attachment_id = absint( $_GET['file'] );
|
||||
@@ -890,10 +890,10 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
|
||||
check_admin_referer( 'custom-header-crop-image' );
|
||||
|
||||
if ( ! current_theme_supports( 'custom-header', 'uploads' ) )
|
||||
wp_die( __( 'Cheatin’ uh?' ) );
|
||||
wp_die( __( 'Cheatin’ uh?' ), 403 );
|
||||
|
||||
if ( ! empty( $_POST['skip-cropping'] ) && ! ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) )
|
||||
wp_die( __( 'Cheatin’ uh?' ) );
|
||||
wp_die( __( 'Cheatin’ uh?' ), 403 );
|
||||
|
||||
if ( $_POST['oitar'] > 1 ) {
|
||||
$_POST['x1'] = $_POST['x1'] * $_POST['oitar'];
|
||||
|
||||
Reference in New Issue
Block a user