reCaptcha does not submit correctly with Random Captcha (from Captcha Pack)
reCaptcha works OK when selected directly from Captcha.

Log message:

Type CAPTCHA
Date ...
User Anonymous
Location http://.../user/register
Referrer http://.../user/register
Message user_register post blocked by CAPTCHA module: challenge "Random CAPTCHA type" (by module "random_captcha_type"), user answered "", but the solution was "1".
Severity notice

Tried combinations:
- CAPTCHA 6.x-2.x-dev (2009-Feb-06)
- CAPTCHA Pack 6.x-1.0-beta2 OR CAPTCHA Pack 6.x-1.x-dev (2008-Apr-07)
- reCAPTCHA 6.x-1.1 OR reCAPTCHA 6.x-1.x-dev (2009-Feb-02)

Cross-filing to all 3 projects.

CommentFileSizeAuthor
#3 patch_random_captcha.diff2.58 KBiva2k
#2 patch_preprocess.diff1.5 KBiva2k

Comments

iva2k’s picture

iva2k’s picture

Status: Active » Needs review
StatusFileSize
new1.5 KB

I reviewed the code in the involved modules. It turns out that reCAPTCHA module uses 'preprocess' op in hook captcha, but random_captcha_type hook does not pass it through. Here's a patch that fixes that issue.

I rolled it out to a production site.

iva2k’s picture

StatusFileSize
new2.58 KB

Going further with the above patch, I added code to pass all supplied arguments to the actual captcha hook, which resulted in new patch (attached). Please disregard the previous patch and use this one instead.

This resolves potential API issues. For instance, it also fixes image captcha problem I reported here: http://drupal.org/node/431672

soxofaan’s picture

Status: Needs review » Fixed

should be fixed by http://drupal.org/cvs?commit=196190

I only committed the preprocess part of you patch. It was not clear where the rest was for
thanks anyway for figuring this out

Status: Fixed » Closed (fixed)

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