I am experiencing problems with the captcha-7.x-1.x-dev version , In a form if i used any AJAX processed fields, after I submit it I receive the error CAPTCHA session reuse attack detected.. If there are no AJAX processed fields means it is working properly.

2 Answers

This is still an issue in the current 7.x-1.0-beta2 version of the Captcha module. However, jay.daysand put in a comment on a issue saying he created a module to fix this issue that you can download and use:

Check out the experimental fix module and let me know if it solves your problems. I can easily add support for more endpoints than just "file/ajax", just let me know.

I downloaded this module and it works great, but had to modify the captcha_ajax_fix_captcha_element_value() method to check for FAPI ajax calls:

 // If this is form is an AJAX submission to "file/ajax", don't process the // CAPTCHA element. if (arg(0) == 'file' && arg(1) == 'ajax' || arg(0) == 'system' && arg(1) == 'ajax') { $element['#processed'] = TRUE; } 

This is a known issue and i was searching for a patch and i found it. this might be useful

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.