Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • F Form Protection
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 13
    • Issues 13
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Extensions
  • Form Protection
  • Merge requests
  • !12

Fix reCAPTCHA v3 validation when token is in $_POST['captcha']

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open messica requested to merge messica/formprotection:messica-main-patch-88031 into main Feb 02, 2023
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

fixes #15

Admittedly didn't spend time looking into where/when/why the token got passed around, but on a client's site $_POST['g-recaptcha-token'] was an empty string and the correct token was in $_POST['captcha']. However the code didn't reach that because $_POST['g-recaptcha-token'] is technically set. Changing to !empty instead fixed this for me.

Edited Feb 02, 2023 by messica
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: messica-main-patch-88031