Is it possible to add wildcard character (*) to Captcha points?

Created on 8 September 2023, 10 months ago
Updated 20 May 2024, about 1 month ago

Problem/Motivation

Hey guys. I've been using the Captcha module since D7 and I can only thank you.

I am currently working on upgrading a website from D7 to D9. On this website, there are more than 1500 nodes, divided into different types of content, with the possibility of sending content to third parties through the Forward module.

It turns out that leaving Forward forms open is not safe and I would like to prevent spam on these forms by adding Captcha challenges.

I found two alternatives to do this, which are the existing options in the Captcha module: i) Add CAPTCHA challenges in all forms; and ii) Create a Captcha point for each node with forwarding permission.

However, enabling CAPTCHA challenges for all forms, despite including Forward, is not feasible, as this action would include Captcha in unwanted places.

The most viable alternative, then, would be to create Captcha points. It turns out that I should include approximately 1500 points to add Captcha challenges to all forms.

So I would like to suggest and check the possibility of adding a wildcard character (*) to the Captcha points, a fact that could reduce the work of many people, in addition to the possibility of working in a more comprehensive and targeted way.

I started this issue by reading this other one:

https://www.drupal.org/project/captcha/issues/3005577 β†’

Steps to reproduce

I did a test with a Captcha point for Forward and it looked like this:

Form ID: forward_form_node_1212
Machine name: forward_form_node_1212

It worked perfectly.

Proposed resolution

I would like to know if there is a possibility for us to do this:

Form ID: forward_form_node_*
Machine name: forward_form_node_*

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

2.0

Component

Miscellaneous

Created by

πŸ‡§πŸ‡·Brazil astutonet Sao Paulo, SP

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

Comments & Activities

  • Issue created by @astutonet
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Hi @astutonet I understand what you refer to, as I also ran into this, knowing the old Drupal 7 Captcha logics. Drupal 8+ Captcha works differently and I don't think the wildcard support will be possible, if I remember correctly. But happy to review community work here.

  • πŸ‡ΊπŸ‡ΈUnited States wylbur Minneapolis, Minnesota, USA

    I'll add another request for this feature. If you are adding webforms to nodes via layout builder, blocks, paragraphs, the webform ID changes:
    form id - webform_submission_contact_add_form
    becomes
    formid - webform_submission_contact_node_20139_add_form

    For now, we are enabling captcha on all forms, and setting permissions that all authenticated users can skip captchas.

Production build 0.69.0 2024