[wp-trac] [WordPress Trac] #54803: https_ssl_verify filter should be documented as accepting string values too

WordPress Trac noreply at wordpress.org
Wed Jan 12 17:36:30 UTC 2022


#54803: https_ssl_verify filter should be documented as accepting string values too
--------------------------+-----------------------------
 Reporter:  chesio        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  HTTP API      |    Version:  4.6
 Severity:  normal        |   Keywords:
  Focuses:  docs          |
--------------------------+-----------------------------
 The `https_ssl_verify` filter is currently
 [https://developer.wordpress.org/reference/hooks/https_ssl_verify/
 documented] to expect and return a boolean value: whether to verify the
 SSL connection.

 In context of `WP_Http::request()` call, it can be however handled a
 string value (path to SSL certificate bundle) too: it gets value of
 `sslcertificates` argument whenever `sslverify` argument is true. See
 lines [https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-
 includes/class-wp-http.php#L355 355], [https://github.com/WordPress
 /wordpress-develop/blob/trunk/src/wp-includes/class-wp-http.php#L359 359]
 and [https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-
 includes/class-wp-http.php#L376 376].

 It seems this is a regression introduced in [37428] where Requests library
 replaced custom implementation.

 Sidenote: The same would apply to the "sibling"
 [https://developer.wordpress.org/reference/hooks/https_local_ssl_verify/
 https_local_ssl_verify] filter, but this filter is currently not executed
 in context of `WP_Http::request()` call - this seem to be a bug, see
 #51767.

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


More information about the wp-trac mailing list