Make WordPress Core

Opened 7 weeks ago

Last modified 7 weeks ago

#60926 new defect (bug)

Missing calling `exit` after using `wp_redirect`

Reported by: jigar-bhanushali's profile jigar bhanushali Owned by:
Milestone: 6.6 Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: has-patch
Focuses: administration, multisite Cc:


When I reviewed the wp-admin/ms-options.php file, I have found missing calling exit

As per the function wp_redirect description, we should call exit after wp_redirect


Attachments (1)

60926.patch (293 bytes) - added by jigar bhanushali 7 weeks ago.

Download all attachments as: .zip

Change History (5)

#1 @jorbin
7 weeks ago

  • Keywords close added

I don't think exit is necessary since the file ends after the redirect.

#2 @johnbillion
7 weeks ago

  • Keywords close removed

I'd be happy enough to add this in for completeness, best practice, etc.

#3 @SergeyBiryukov
7 weeks ago

  • Milestone changed from Awaiting Review to 6.6

#4 @Presskopp
7 weeks ago

The description says:

Note: wp_redirect() does not exit automatically, and should almost always be followed by a call to exit;

Therefore I go with jorbin

Note: See TracTickets for help on using tickets.