Make WordPress Core


Ignore:
Timestamp:
11/16/2014 06:15:29 AM (10 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/media-upload.php

    r29206 r30356  
    3333// Require an ID for the edit screen.
    3434if ( isset($action) && $action == 'edit' && !$ID )
    35     wp_die( __( 'Cheatin’ uh?' ) );
     35    wp_die( __( 'Cheatin’ uh?' ), 403 );
    3636
    3737    if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) )
    38         wp_die( __( 'Cheatin’ uh?' ) );
     38        wp_die( __( 'Cheatin’ uh?' ), 403 );
    3939
    4040    // Upload type: image, video, file, ..?
Note: See TracChangeset for help on using the changeset viewer.