JanSiero / SuiteCRM_Captcha

Captcha implementation for SuiteCRM based on securimage
GNU Affero General Public License v3.0
1 stars 0 forks source link

You didn't type the Captcha text correctly, please retry #2

Open MuhammadHamzaShahid opened 9 months ago

MuhammadHamzaShahid commented 9 months ago

Everytime giving this error: You didn't type the Captcha text correctly, please retry Version: Version 7.14.0 Any suggestions?

JanSiero commented 9 months ago

Hi Muhammad, did you update SuiteCRM after installing the module?

In that case, to temporarily disable the Captcha check, edit modules/Users/Authenticate.php

and comment out or remove the following lines (starting at line 57)

if ($securimage->check($_POST['captcha_code']) == false) {
         // the code was incorrect
         // you should handle the error so that the form processor doesn't continue
         // or you can use the following code if there is no validation or you do not know how
       header("Location: index.php?action=Login&module=Users&loginErrorMessage=ERR_CAPTCHA_INCORRECT");
       sugar_cleanup(true);
}

This should enable you to login again. When you want to re-enable Captcha check:

As written in the README, always remember when upgrading to:

MuhammadHamzaShahid commented 9 months ago

Thanks for the response, but i haven't updated the CRM. I have directly installed it on 7.14.

On debugging i found that: $_POST['captcha_code'] , this is empty.

Any Idea?

JanSiero commented 9 months ago

Hi, could you check which version of SecurImage you use by checking the following file?

custom/include/securimage/securimage.php

Line 39 contains

Only version 3 is supported. When you download from Github the default branch is "nextgen", which is version 4. In case you packaged the module wih version 4, could you uninstall it and package it with version 3 by downloading from here?

https://github.com/dapphp/securimage/releases/tag/3.6.8

Either way "captcha_code" should be part of the POST payload.