I've experienced problems with CAPTCHA 7.x-1.0-beta1 in forms with AJAX: CAPTCHA could never be solved (see http://drupal.org/node/1024370, #9 helped me with that).
Now, in beta2, there is another problem. If a form has AJAX, and you change the element that triggers de AJAX, you get this message: "CAPTCHA session reuse attack detected.".
I've found that _captcha_get_posted_captcha_info() uses $form_state['submitted'] to detect a submitted form. An AJAX 'submitted' form does not have that flag, so I think $form_state['triggering_element'] should be used, instead. Patch is attached.
I had to apply the change in http://drupal.org/node/1024370#comment-4159970 too, but I did not include it in the attached patch, because it breaks other things.
|#16||Screenshot Capcha issue 02_07_2012.png||42.05 KB||valery86|
|#15||Screenshot from 2012-06-16 22:54:45.png||84.64 KB||elvis2|
|PASSED: [[SimpleTest]]: [MySQL] 731 pass(es). |
[ View ]
|PASSED: [[SimpleTest]]: [MySQL] 718 pass(es). |
[ View ]