diff --git a/lib/Subscription/CaptchaSession.php b/lib/Subscription/CaptchaSession.php index 8fe12de1f1..b1cd634afe 100644 --- a/lib/Subscription/CaptchaSession.php +++ b/lib/Subscription/CaptchaSession.php @@ -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'; diff --git a/tests/integration/API/JSON/v1/SubscribersTest.php b/tests/integration/API/JSON/v1/SubscribersTest.php index 5d0327ebfa..d309cff9f2 100644 --- a/tests/integration/API/JSON/v1/SubscribersTest.php +++ b/tests/integration/API/JSON/v1/SubscribersTest.php @@ -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,