Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.3

Bug #17383 Services_ReCaptcha::validate should not send request if empty chall/resp
Submitted: 2010-05-10 00:17 UTC
From: crodriguez Assigned: izi
Status: Closed Package: Services_ReCaptcha (version 1.0.0)
PHP Version: 5.3.2 OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2010-05-10 00:17 UTC] crodriguez (Cristian Rodriguez)
Description: ------------ If $challenge = null or $response = null (as default when calling validate()) Services recaptcha performs the http request anyway, this is against the recaptcha api documentation recommended Test script: --------------- ---- Expected result: ---------------- not doing http request at all Actual result: -------------- Doing the request patch: if(empty($challenge) || empty($response)) return false; before the try{} block in Recaptcha.php

Comments

 [2010-05-10 00:19 UTC] crodriguez (Cristian Rodriguez)
if(empty($challenge) || empty($response)) return false; as patch, just before the try{} block in validate.
 [2010-05-10 02:10 UTC] izi (David Jean Louis)
-Status: Open +Status: Closed -Assigned To: +Assigned To: izi
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Good catch Cristian, fixed in revision 299190: http://svn.php.net/viewvc?view=revision&revision=299190 Thanks !