Problem/Motivation

The "Enable CAPTCHA challenges on all forms" setting has some major issues. I currently found two of them:

1. Enabling this option will NOT create a Captcha on the Login Form, I am unsure yet if this has something to-do with the anonymous user, or the specific form.
2. Enabling this option and going to "/admin/content" will lead to the following error:

Drupal\captcha\Exception\CaptchaValidationNullException: Error: Solution or Response is NULL! in captcha_validate_case_insensitive_equality() (line 315 of modules/custom/captcha/captcha.module).

Steps to reproduce

1. Try to log in with "Enable CAPTCHA challenges on all forms" enabled and the Captcha Point for user login form disabled.

2. Create a role with every permission except the skip captcha permission. Enable "Enable CAPTCHA challenges on all forms" and go to "/admin/content".

Proposed resolution

Fix the problems, see if further problems arise and write tests to avoid further problems with this setting.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork captcha-3324357

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Grevil created an issue. See original summary.

Anybody’s picture

Assigned: Unassigned » Anybody
Priority: Normal » Major
Issue tags: +Needs tests

Thanks for figuring this out @Grevil! This is indeed problematic and we should try to fix it before 2.x alpha.

Setting priority to Major and I'll have a look at it.

Anybody’s picture

I can confirm both of the issues, thanks. Working on it.

Anybody’s picture

Assigned: Anybody » Unassigned
Status: Active » Fixed
Issue tags: -Needs tests

Works as expected now, eventhough the captcha points have to be DELETED, related to

and the Captcha Point for user login form disabled

Which I think is unexpected and not intuitive, so I'll add that point to #3324380: Make Captcha settings "Add CAPTCHA administration links to forms" and "add administration link" clearer as follow-up for further improvement. Also we should add a global task for adding further tests.

  • Anybody committed b1adade on 2.x
    Issue #3324357: Fix "Enable CAPTCHA challenges on all forms" setting
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Grevil’s picture

Priority: Major » Normal
Status: Closed (fixed) » Active

This only fixed the second problem, but not the first...

Please make sure somebody reviews the changes first, before merging and closing issues.

Grevil’s picture

Status: Active » Fixed

But let's actually open a separate issue for this!

Anybody’s picture

Indeen I should not have closed this. We need additional tests here to ensure this doesn't break again, sorry. This was urgent and I was in a hurry. Still it made things better than before ;)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.