Option to verify timestamp of programmatic submission

Created on 15 June 2023, almost 2 years ago

Problem/Motivation

Drupal module webform_rest β†’ provides an API to do webform submissions.
These are counted as "progammed" submission, and honeypot does skip the validation for time restrictions in that case since 2677126 β†’ .

It would be nice if there was a way to tell honeypot that programmed submissions shall have the time restrictions validated.

Proposed resolution

HoneypotService could have a method "setValidateProgrammedForms" which would allow enabling/disabling time restriction checks for forms whose $form_state->isProgrammed() returns true. That way webform_rest could enable it before creating the webform submission, and disable it afterwards.

Maybe there is a better way that does not involve using a "global" scoped variable inside the honeypot service, but I don't know the code good enough.

✨ Feature request
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany cweiske

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024