Fix captcha transient lifetime, remove a duplicate string [MAILPOET-2246]

This commit is contained in:
wxa
2019-08-05 20:51:54 +03:00
committed by Jack Kitterhing
parent 579ce5fc64
commit 15c36e851e
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ use MailPoet\Config\Session;
use MailPoet\WP\Functions as WPFunctions;
class CaptchaSession {
const EXPIRATION = 300; // 5 minutes
const EXPIRATION = 1800; // 30 minutes
const SESSION_HASH_KEY = 'hash';
const SESSION_FORM_KEY = 'form';

View File

@ -545,7 +545,7 @@ class SubscribersTest extends \MailPoetTest {
$subscriber->count_confirmations = 1;
$subscriber->save();
$captcha_value = 'ihg5w';
$this->captcha_session->setCaptchaHash('ihg5w');
$this->captcha_session->setCaptchaHash($captcha_value);
$response = $this->endpoint->subscribe([
$this->obfuscatedEmail => $email,
'form_id' => $this->form->id,