[wp-trac] [WordPress Trac] #50282: wp_ajax_health_check_is_in_debug_mode is not used, contains incorrect nonce check

WordPress Trac noreply at wordpress.org
Fri May 29 21:45:29 UTC 2020


#50282: wp_ajax_health_check_is_in_debug_mode is not used, contains incorrect nonce
check
--------------------------+-----------------------------
 Reporter:  johnbillion   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Site Health   |    Version:  5.2
 Severity:  normal        |   Keywords:  2nd-opinion
  Focuses:                |
--------------------------+-----------------------------
 The `wp_ajax_health_check_is_in_debug_mode()` function is not used because
 the `is_in_debug_mode` site health check is a direct one, not an async
 one, therefore this Ajax handler is not used.

 In addition the nonce check in this function is incorrect.
 `wp_verify_nonce()` is called without its return value being checked,
 rendering it non-functional.

 It looks like this function can be safely removed. Marking as needs a
 second opinion in case I missed something.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50282>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list