Case Insensitive Captcha

Small hack to create a case insensitive Captcha.

To install the hack...

1) Open the file: /include/modules/Account/classes/PhpFox_ComponentRandomImage.class.php

Look for:

PHP:
$sStr $this->_generateCode(6); 


Under that add:
PHP:
$sStr strtolower($sStr); 


2) Next open the file: /include/modules/Account/classes/PhpFox_ServiceSecurity.class.php

Look for:
PHP:
$aRow $oDb->getRow("SELECT captcha_id, imagehash FROM " App::getT('captcha') . " WHERE captcha_id = '" $iId "' AND imagehash = '" md5(md5($sCode) . $iId) . "'"); 


Above that add:
PHP:
$sCode strtolower($sCode); 


3) Next open the file: /design/templates/default/_modules/Account/Signup.html

Look for:
HTML:
<div style="font-size:8pt;"><i>({language text='Mod_Account.code_case_sensitive'})</i></div>


You could remove the above mentioned code which displays the following:
Quote:

(Verification code is case sensitive)

However if you would like to mention to your members that the Captcha is case insensitive you could replace it with:
HTML:
<div style="font-size:8pt;"><i>(Verification code is case insensitive)</i></div>


Thats it. Run into any problems let me know.


Reviews
No Reviews.