Make WordPress Core


Ignore:
Timestamp:
11/16/2014 06:15:29 AM (9 years ago)
Author:
johnbillion
Message:

Switch to a 403 response code in places where it is more appropriate than a 500 due to permissions errors.

Fixes #10551
Props nacin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/custom-header.php

    r30327 r30356  
    740740        check_admin_referer('custom-header-upload', '_wpnonce-custom-header-upload');
    741741        if ( ! current_theme_supports( 'custom-header', 'uploads' ) )
    742             wp_die( __( 'Cheatin’ uh?' ) );
     742            wp_die( __( 'Cheatin’ uh?' ), 403 );
    743743
    744744        if ( empty( $_POST ) && isset( $_GET['file'] ) ) {
     
    891891
    892892        if ( ! current_theme_supports( 'custom-header', 'uploads' ) )
    893             wp_die( __( 'Cheatin’ uh?' ) );
     893            wp_die( __( 'Cheatin’ uh?' ), 403 );
    894894
    895895        if ( ! empty( $_POST['skip-cropping'] ) && ! ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) )
    896             wp_die( __( 'Cheatin’ uh?' ) );
     896            wp_die( __( 'Cheatin’ uh?' ), 403 );
    897897
    898898        if ( $_POST['oitar'] > 1 ) {
Note: See TracChangeset for help on using the changeset viewer.