Empty basic-captcha field allows bypassing the captcha
vedranmiletic opened this issue · 3 comments
vedranmiletic commented
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.
vedranmiletic commented
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.
rhukster commented
Do you have sessions disabled in Grav?
rhukster commented
It uses Grav's built-in session logic:
public function __construct()
{
$this->session = Grav::instance()['session'];
}