Fix captcha transient lifetime, remove a duplicate string [MAILPOET-2246]
This commit is contained in:
@ -6,7 +6,7 @@ use MailPoet\Config\Session;
|
|||||||
use MailPoet\WP\Functions as WPFunctions;
|
use MailPoet\WP\Functions as WPFunctions;
|
||||||
|
|
||||||
class CaptchaSession {
|
class CaptchaSession {
|
||||||
const EXPIRATION = 300; // 5 minutes
|
const EXPIRATION = 1800; // 30 minutes
|
||||||
|
|
||||||
const SESSION_HASH_KEY = 'hash';
|
const SESSION_HASH_KEY = 'hash';
|
||||||
const SESSION_FORM_KEY = 'form';
|
const SESSION_FORM_KEY = 'form';
|
||||||
|
@ -545,7 +545,7 @@ class SubscribersTest extends \MailPoetTest {
|
|||||||
$subscriber->count_confirmations = 1;
|
$subscriber->count_confirmations = 1;
|
||||||
$subscriber->save();
|
$subscriber->save();
|
||||||
$captcha_value = 'ihg5w';
|
$captcha_value = 'ihg5w';
|
||||||
$this->captcha_session->setCaptchaHash('ihg5w');
|
$this->captcha_session->setCaptchaHash($captcha_value);
|
||||||
$response = $this->endpoint->subscribe([
|
$response = $this->endpoint->subscribe([
|
||||||
$this->obfuscatedEmail => $email,
|
$this->obfuscatedEmail => $email,
|
||||||
'form_id' => $this->form->id,
|
'form_id' => $this->form->id,
|
||||||
|
Reference in New Issue
Block a user