Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty basic-captcha field allows bypassing the captcha #580

Open
vedranmiletic opened this issue Oct 23, 2022 · 3 comments
Open

Empty basic-captcha field allows bypassing the captcha #580

vedranmiletic opened this issue Oct 23, 2022 · 3 comments

Comments

@vedranmiletic
Copy link

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
Copy link
Author

vedranmiletic commented Oct 23, 2022

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
Copy link
Member

Do you have sessions disabled in Grav?

@rhukster
Copy link
Member

It uses Grav's built-in session logic:

    public function __construct()
    {
        $this->session = Grav::instance()['session'];
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants