Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#31422 closed defect (bug) (fixed)

Permission errors should not return 500 server error.

Reported by: yo-l1982 Owned by: jeremyfelt
Priority: normal Milestone: 4.2
Component: Networks and Sites Version: 4.2
Severity: normal Keywords: has-patch
Cc: Focuses: multisite

Description

In network-installs, permission denied errors send an 500 server error.
Should be 403.

This status code can be confusing when load balancers captures server errors to hide from users but nothing gets logged in error logs.

Attachments (1)

network-500-error.patch (7.7 KB ) - added by yo-l1982 12 years ago.
Patch for this issue.

Download all attachments as: .zip

Change History (4)

@yo-l1982
12 years ago

Patch for this issue.

#1 @SergeyBiryukov
12 years ago

  • Keywords has-patch added
  • Milestone Awaiting Review4.2

Makes sense, see [30356] and [31300].

#2 @jeremyfelt
12 years ago

  • Owner set to jeremyfelt
  • Resolutionfixed
  • Status newclosed

In 31658:

Return HTTP status code 403 in network admin when access is forbidden.

When the error message "You do not have permission to access this page" is used in network admin screens, return an HTTP status code of 403 to match. Previously: [30356] and [31300].

Props yo-l1982.

Fixes #31422.

#3 @nacin
11 years ago

In 32152:

Update wp_die() calls modified in [31658] to use shorthand calling style.

see #31422.

Note: See TracTickets for help on using tickets.