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

Why is the captcha skipping invalid code? #221

Open
StasToken opened this issue Feb 20, 2021 · 0 comments
Open

Why is the captcha skipping invalid code? #221

StasToken opened this issue Feb 20, 2021 · 0 comments

Comments

@StasToken
Copy link

StasToken commented Feb 20, 2021

gregwar/captcha-bundle: ^2.1
Symfony 5.2.2
I installed the captcha and configured it as described in the instructions for my standard login form

namespace App\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Gregwar\CaptchaBundle\Type\CaptchaType;
use Symfony\Component\Form\Extension\Core\Type\PasswordType;

class LoginType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('email',null,array('label' => false,'attr' => ['class' => 'register-form-input','autocomplete' => 'off']));
        $builder->add('password',PasswordType::class,array('label' => false,'attr' => ['class' => 'register-form-input','autocomplete' => 'off']));
        $builder->add('captcha', CaptchaType::class,array('label' => false,'attr' => ['class' => 'register-form-input','autocomplete' => 'off']));
    }
    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            // Configure your form options here
        ]);
    }
}

The form is shown, but the validation is always successful even if I enter a code that does not match the picture
WTF? - Should I check it myself with my hands? but then how should I do it?
Or I somehow misunderstood the purpose of this package - can you get a comment on this issue?

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

1 participant