[wp-trac] [WordPress Trac] #58047: Fix non-strict comparison operator in /wp-admin/includes/schema.php line 1105

WordPress Trac noreply at wordpress.org
Sat Apr 1 17:30:02 UTC 2023


#58047: Fix non-strict comparison operator in /wp-admin/includes/schema.php line
1105
------------------------------+-----------------------------
 Reporter:  faisalahammad     |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  General           |    Version:  trunk
 Severity:  normal            |   Keywords:  needs-patch
  Focuses:  coding-standards  |
------------------------------+-----------------------------
 The issue with the code in **/wp-admin/includes/schema.php** line **1105**
 is that the comparison operator "==" is being used to compare the response
 code returned by wp_remote_retrieve_response_code() with the integer value
 200. This is a non-strict comparison operator, which means that it will
 also return true if the response code is a string "200". This can lead to
 unexpected behavior or security vulnerabilities.

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


More information about the wp-trac mailing list