nenes25 / eicaptcha

Captcha module for prestashop
292 stars 84 forks source link

Spam from the contact form continues to arrive #274

Open Nena84 opened 6 months ago

Nena84 commented 6 months ago

Check if your issue exists

Your prestashop version

< 1.7

Eicaptcha version

2.5.x

Do you use a specific theme ?

Warehouse

Describe the bug

I installed the module. In advanced parameters I enabled Load Recaptcha library everywhere since I use the warehouse theme. The module installation check is successful. However, spam messages continue to arrive from the contact form. I can't understand why. Can you help me?

Screenshots

No response

Additional context

No response

SharmPRO commented 6 months ago

+1 also found this issue. Solved modifying _validateCaptcha() in eicaptcha.php file, adding a test if message fields is just a valid email as first lines of the function. ...

    $message = Tools::getValue('message');
    if(Validate::isEmail($message)){
        $this->debugger->log('Message is just email: '.$message);
        $context = Context::getContext();
        $context->controller->errors[] = 'Invalid content!'; 
        return false;             
    }

...

nenes25 commented 6 months ago

Thanks @SharmPRO for the return. Is the issue related with an ajax form or a basic one ?

Regards,

cdigruttola commented 6 months ago

Good morning,

same issue with the basic form.

nenes25 commented 6 months ago

ok thanks for the return and with v2 or v3 keys ?

cdigruttola commented 6 months ago

Hi, in my case with v3.

Nena84 commented 6 months ago

+1 also found this issue. Solved modifying _validateCaptcha() in eicaptcha.php file, adding a test if message fields is just a valid email as first lines of the function. ...

    $message = Tools::getValue('message');
    if(Validate::isEmail($message)){
        $this->debugger->log('Message is just email: '.$message);
        $context = Context::getContext();
        $context->controller->errors[] = 'Invalid content!'; 
        return false;             
    }

...

I added the code like this: is this correct? modifica

SharmPRO commented 6 months ago

Correct

SharmPRO commented 6 months ago

Thanks @SharmPRO for the return. Is the issue related with an ajax form or a basic one ?

Regards,

contact form from warehouse theme. Do not uses ajax

Nena84 commented 6 months ago

Corretto

HI, I tested the solution but unfortunately the emails still arrived. Anyone else have the same problem? Thank you

jouino16 commented 5 months ago

Hi,

Thank you @nenes25 for developing the module.

I'm facing the same issue with SPAM emails from the contact form. The received messages contain only an email address.

Thanks to @SharmPRO I was able to apply his solution as workaround. But it is just a workaround (as we check if the message is an email), meaning that there is still a bug. They manage to avoid the captcha check and send the message.

I also did the module installation check, and it shows the following errors: msedge_vnA9d17Yju

I don't know if this has an impact. Please @nenes25 let me know. Please note that I only use the Captcha in the contact form.

Thank you in advance.

mrm-aude commented 3 months ago

Hello ! Thank you @nenes25 for your very usefull module!

I have the same problem since yesterday. Spams use emails with domain registry.godaddy I use Recaptcha V3.

mrm-aude commented 3 months ago

I enabled debug mode. On spam sending, I have these informations:

2024-06-06 09:09:58: Merci de valider le captcha
2024-06-06 09:09:58: Réponse recaptcha Array
(
    [0] => missing-input-response
)

And email is sent.