Jump to content
thirty bees forum

Recommended Posts

Posted

The spam is increasing. Somehow they get around the captcha because now it's every 10 minutes. I've increased the the settings to maximum checks @ google captcha page but I doubt this will help. Very strange

Posted

Well, on front end everything looks ok. So the issue is probably with override. Please check that there is override installed for ContactController. Also, make sure that both "Disable non thirty bees modules" and "Disable all overrides" are set to NO.

Posted

<?php class ContactController extends ContactControllerCore { /* * module: nocaptcharecaptcha * date: 2018-07-06 22:39:10 * version: 1.0.2 */ public function postProcess() { if (version_compare(_PS_VERSION_, '1.7.0.0', '>=')) { return; } if (!Module::isEnabled('NoCaptchaRecaptcha') || !@filemtime(_PS_MODULE_DIR_.'nocaptcharecaptcha/nocaptcharecaptcha.php') ) { return parent::postProcess(); } require_once _PS_MODULE_DIR_.'nocaptcharecaptcha/nocaptcharecaptcha.php'; $recaptcha = new NoCaptchaRecaptcha(); if (Tools::isSubmit('submitMessage') && $recaptcha->needsCaptcha('contact', trim(Tools::getValue('from')))) { $recaptchalib = new NoCaptchaRecaptchaModule\RecaptchaLib(Configuration::get('NCRC_PRIVATE_KEY')); $resp = $recaptchalib->verifyResponse(Tools::getRemoteAddr(), Tools::getValue('g-recaptcha-response')); if ($resp == null || !($resp->success)) { if ($resp->error_codes[0] === 'invalid-input-secret') { $this->errors[] = Tools::displayError( Translate::getModuleTranslation( 'NoCaptchaRecaptcha', 'The reCAPTCHA secret key is invalid. Please contact the site administrator.', 'configure' ) ); } elseif ($resp->error_codes[0] === 'google-no-contact') { if (!Configuration::get('NCRC_GOOGLEIGNORE')) { $this->errors[] = Tools::displayError( Translate::getModuleTranslation( 'NoCaptchaRecaptcha', 'Unable to connect to Google in order to verify the captcha. Please check your server settings or contact your hosting provider.', 'configure' ) ); } } else { $this->errors[] = Tools::displayError( Translate::getModuleTranslation( 'NoCaptchaRecaptcha', 'Your captcha was wrong. Please try again.', 'configure' ) ); } $this->context->smarty->assign('authentification_error', $this->errors); return; } } return parent::postProcess(); } }

This is in my override for ContactController. Obviously part of the module.

Posted

That's weird. I'd really need access to your server to investigate further. At this point, it can be

1) the override code is not triggered (overrides are disabled, or maybe class_index.php is corrupted). You could check this by editing override file, and add some die('override is triggered') somewhere at the beginning of postProcess function.

2) the google captcha has been broken. That's not very likely. If this is the case, there's not much you can do until google fixes it

3) this is not an automated spam, but someone is posting the comments manually. Again, not very likely, but who knows

  1. I can't think of anything else

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...