Opened 5 years ago
Closed 4 years ago
#50282 closed defect (bug) (fixed)
wp_ajax_health_check_is_in_debug_mode is not used, contains incorrect nonce check
Reported by: | johnbillion | Owned by: | johnbillion |
---|---|---|---|
Milestone: | 5.6 | Priority: | low |
Severity: | normal | Version: | 5.2 |
Component: | Site Health | Keywords: | |
Focuses: | Cc: |
Description
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.
Change History (4)
#2
@
4 years ago
Sorry about the late followup, yes it should be fine to remove this, it looks to be an accidental fragment of a previous implementation used in the plugin before it was merged to core.
Note: See
TracTickets for help on using
tickets.
Can I get a second opinion on removing this function?