Loading lib/Controller/AccountController.php +2 −2 Original line number Diff line number Diff line Loading @@ -234,10 +234,10 @@ class AccountController extends Controller { public function verifyCaptcha(string $captchaInput = '') : DataResponse { $response = new DataResponse(); $captchaResult = (string) $this->session->get('captcha_result', ''); $captchaResult = (string) $this->session->get(CaptchaService::CAPTCHA_RESULT_KEY, ''); $response->setStatus(400); if ($captchaResult === $captchaInput) { $this->session->remove('captcha_result'); $this->session->remove(CaptchaService::CAPTCHA_RESULT_KEY); $this->session->set(self::CAPTCHA_VERIFIED_CHECK, true); $response->setStatus(200); } Loading lib/Service/CaptchaService.php +2 −1 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ class CaptchaService { public const NUMBERS = '123456789'; public const SYMBOLS = '+-'; public const NOISE_LEVEL = 13; public const CAPTCHA_RESULT_KEY = 'captcha_result'; public function __construct(ISession $session) { $this->session = $session; Loading Loading @@ -195,7 +196,7 @@ class CaptchaService { * @return void */ private function updateSession(float $captchaResult): void { $this->session->set('captcha_result', $captchaResult); $this->session->set(self::CAPTCHA_RESULT_KEY, $captchaResult); } Loading Loading
lib/Controller/AccountController.php +2 −2 Original line number Diff line number Diff line Loading @@ -234,10 +234,10 @@ class AccountController extends Controller { public function verifyCaptcha(string $captchaInput = '') : DataResponse { $response = new DataResponse(); $captchaResult = (string) $this->session->get('captcha_result', ''); $captchaResult = (string) $this->session->get(CaptchaService::CAPTCHA_RESULT_KEY, ''); $response->setStatus(400); if ($captchaResult === $captchaInput) { $this->session->remove('captcha_result'); $this->session->remove(CaptchaService::CAPTCHA_RESULT_KEY); $this->session->set(self::CAPTCHA_VERIFIED_CHECK, true); $response->setStatus(200); } Loading
lib/Service/CaptchaService.php +2 −1 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ class CaptchaService { public const NUMBERS = '123456789'; public const SYMBOLS = '+-'; public const NOISE_LEVEL = 13; public const CAPTCHA_RESULT_KEY = 'captcha_result'; public function __construct(ISession $session) { $this->session = $session; Loading Loading @@ -195,7 +196,7 @@ class CaptchaService { * @return void */ private function updateSession(float $captchaResult): void { $this->session->set('captcha_result', $captchaResult); $this->session->set(self::CAPTCHA_RESULT_KEY, $captchaResult); } Loading