diff options
author | Marco Ceppi <marco@ceppi.net> | 2014-02-13 16:21:45 -0500 |
---|---|---|
committer | Marco Ceppi <marco@ceppi.net> | 2014-02-13 16:21:45 -0500 |
commit | cb53da46b73baff46ae325eb799d91703acc3780 (patch) | |
tree | 101d615de729467ee33cf03af66f98409a08a4d5 /Auth | |
parent | 654dd027437960f7e5fc261fd9ebff2a4efcaf89 (diff) | |
parent | 148926d7dbe532aed8eceaad85a2a30da9e86c63 (diff) | |
download | php-openid-cb53da46b73baff46ae325eb799d91703acc3780.zip php-openid-cb53da46b73baff46ae325eb799d91703acc3780.tar.gz php-openid-cb53da46b73baff46ae325eb799d91703acc3780.tar.bz2 |
Merge pull request #115 from marcoceppi/warn-when-person-is-doing-harm
Add warning when you disable SSL, don't be silly please
Diffstat (limited to 'Auth')
-rw-r--r-- | Auth/Yadis/ParanoidHTTPFetcher.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Auth/Yadis/ParanoidHTTPFetcher.php b/Auth/Yadis/ParanoidHTTPFetcher.php index 8f55667..627ea9a 100644 --- a/Auth/Yadis/ParanoidHTTPFetcher.php +++ b/Auth/Yadis/ParanoidHTTPFetcher.php @@ -90,11 +90,16 @@ class Auth_Yadis_ParanoidHTTPFetcher extends Auth_Yadis_HTTPFetcher { $this->reset(); $c = curl_init(); - if (defined('Auth_OpenID_DISABLE_SSL_VERIFYPEER') + if (defined('Auth_OpenID_DISABLE_SSL_VERIFYPEER') && Auth_OpenID_DISABLE_SSL_VERIFYPEER === true) { + trigger_error( + 'You have disabled SSL verifcation, this is a TERRIBLE ' . + 'idea in almost all cases. Set Auth_OpenID_DISABLE_SSL_' . + 'VERIFYPEER to false if you want to be safe again', + E_USER_WARNING); curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false); } - + if ($c === false) { Auth_OpenID::log( "curl_init returned false; could not " . |