[wp-trac] [WordPress Trac] #16904: CURLOPT_SSL_VERIFYHOST Should use 2 instead of true

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 21 13:30:10 UTC 2011


#16904: CURLOPT_SSL_VERIFYHOST Should use 2 instead of true
---------------------------------+-----------------------------
 Reporter:  sivel                |       Owner:
     Type:  defect (bug)         |      Status:  new
 Priority:  normal               |   Milestone:  Future Release
Component:  HTTP                 |     Version:  3.1
 Severity:  normal               |  Resolution:
 Keywords:  has-patch 3.2-early  |
---------------------------------+-----------------------------

Comment (by hakre):

 Hmm, I just ran over the fact that any (bool) is infact an (int), if it's
 TRUE it is (int) 1, if it is false, it is (int) 0.

 So in case we don't change the current implementation, users of the cUrl
 transport are able to additionally specify 2 here, which is also (bool)
 TRUE for the second setting. Same for 1, it's (bool) TRUE for the second
 setting as well.

 The unpatched code:

 {{{
    curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, $ssl_verify );
    curl_setopt( $handle, CURLOPT_SSL_VERIFYPEER, $ssl_verify );
 }}}

 Forcing $ssl_verify to result in either 2 or 0 for CURLOPT_SSL_VERIFYHOST
 will remove the possibility to set the value to 1.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16904#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list