Regenerate CAPTCHA phrase using a custom request with cachebust to avoid caching

[MAILPOET-6038]
This commit is contained in:
Jan Jakes
2024-07-30 15:36:12 +02:00
committed by Aschepikov
parent 758cb09a77
commit ee6e22efa3
5 changed files with 52 additions and 5 deletions

View File

@@ -75,6 +75,10 @@ class CaptchaRenderer {
$builder->output();
}
public function refreshPhrase(string $sessionId): string {
return $this->phrase->createPhrase($sessionId);
}
private function getPhrase(string $sessionId): string {
$phrase = $this->phrase->getPhrase($sessionId);
if (!$phrase) {