Commit Graph

7 Commits

Author SHA1 Message Date
Mustapha Hadid
3bda992f13 Move CAPTCHA classes under MailPoet\Captcha dir
CAPTCHA usage is no longer tied to MP's subscription form.
2024-12-17 13:56:00 +02:00
Jan Jakes
ee6e22efa3 Regenerate CAPTCHA phrase using a custom request with cachebust to avoid caching
[MAILPOET-6038]
2024-08-05 13:28:52 +02:00
Jan Jakes
82aeb89854 Use strict types in tests
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
David Remer
7db40b27b5 Fix errors automatically with phpcbf
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
David Remer
4832771185 Refactor the captcha system
The current Captcha class has a lot of responsibilities. It renders the captcha
image, can check if a certain captcha type is a Google captcha, if a captcha is
required for a certain email. The SubscriberSubscribeController is not only in
charge of "controlling" the subscription process but also validates, whether a
captcha is correct or not. This architecture made it difficult to extend the
functionality and introduce the audio captcha feature.

Therefore this commit refactors the captcha architecture and tries to seperate
the different concerns into several classes and objects. Validation is now done
by validators.

The CaptchaPhrase now is in charge of keeping the captcha phrase consistent
between the image and the new audio, so that you can renew the captcha and both
captchas are in sync.

[MAILPOET-4514]
2022-11-24 09:20:39 +01:00
Sam Najian
4fe8d10d6c Update tests for Subscription and pass the new argument
[MAILPOET-4703]
2022-11-11 09:21:30 +01:00
Jan Jakes
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00