Details
-
Bug
-
Resolution: Fixed
-
High
-
2.1.0, 1.13.2
-
None
Description
Currently, eZ Form captcha field doesn't work properly when Varnish is enabled. Captcha reload image request ends up with 428 Precondition Required response and an empty graphic (without any characters).
Steps to reproduce:
1. Create a clean eZ Platform EE installation.
2. Create simple eZ Form using Page Builder with captcha field.
3. Configure Varnish to work with your installation.
4. Make sure you are not authorized by testing it e.g. using incognitto mode.
5. Visit the front site of your installation.
6. Hit formcaptcha.reload_image button.
The result:
You can see an empty captcha image and a request with the mentioned status code 428 Precondition Required
Problem is caused by empty value of $keys variable which causes displaying of an empty captcha image.
Ref: https://github.com/ezsystems/ezstudio-form-builder/blob/master/bundle/Controller/CaptchaController.php#L62-L65