grav-plugin-form
grav-plugin-form copied to clipboard
Empty basic-captcha field allows bypassing the captcha
I copied everything from the Basic Captcha documentation, so I'm using defaults. When I enter the wrong text into the basic captcha field, form processing behaves as expected and the error message is shown. When I enter nothing (the field stays empty), the form is submitted successfully.
For some reason the $this->setSession()
function call in getCaptchaCode()
function seems to have no effect, i.e. the session data for the captcha is not there when the page loads.
Do you have sessions disabled in Grav?
It uses Grav's built-in session logic:
public function __construct()
{
$this->session = Grav::instance()['session'];
}