Skip to content
This repository was archived by the owner on Aug 28, 2021. It is now read-only.
This repository was archived by the owner on Aug 28, 2021. It is now read-only.

Add reCAPTCHA check for creating new paste #8

@Albert221

Description

@Albert221

Our paste service has became a pretty friendly place for bots posting links to illegal movies. To prevent that, a anti-bot mechanism should be implemented. My choice is reCAPTCHA.

image

Implementing it should be fairly easy:

  1. Add required front-end code to the home.twig view.
  2. Add reCAPTCHA key sample(s) to the config.yml.example file.
  3. Add check for the reCAPTCHA in paste creation validator.
    • You will need to refactor it a bit, so that it takes the mandatory keys using Dependency Injection (through the constructor).
    • Create this validator as a service in AppKernel.php.
    • Pass this newly created service to the PasteController

Here is some blog article that I quickly found on Google describing how to check the captcha: Implementing google reCAPTCHA on a form in symfony 3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions