WordPress.org

Make WordPress Core


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

    r29707 r30356  
    1111
    1212if ( ! current_user_can( 'list_users' ) )
    13     wp_die( __( 'Cheatin’ uh?' ) );
     13    wp_die( __( 'Cheatin’ uh?' ), 403 );
    1414
    1515$wp_list_table = _get_list_table('WP_Users_List_Table');
     
    129129        // If the user doesn't already belong to the blog, bail.
    130130        if ( is_multisite() && !is_user_member_of_blog( $id ) )
    131             wp_die(__('Cheatin’ uh?'));
     131            wp_die( __( 'Cheatin’ uh?' ), 403 );
    132132
    133133        $user = get_userdata( $id );
Note: See TracChangeset for help on using the changeset viewer.