Commit d6d81bcb authored by arknoll's avatar arknoll Committed by elachlan

Issue #2814137 by B N Pandey, arknoll: Ajax in forms still creates CAPTCHA...

Issue #2814137 by B N Pandey, arknoll: Ajax in forms still creates CAPTCHA session reuse attack detected
parent d57b1c2f
......@@ -50,7 +50,7 @@ class Captcha extends FormElement {
// Add JavaScript for general CAPTCHA functionality.
$element['#attached']['library'][] = 'captcha/base';
if ($form_state->getTriggeringElement() && !empty($form_state->getTriggeringElement()['#limit_validation_errors'])) {
if ($form_state->getTriggeringElement() && is_array($form_state->getTriggeringElement()['#limit_validation_errors'])) {
// This is a partial (ajax) submission with limited validation. Do not
// change anything about the captcha element, assume that it will not
// update the captcha element, do not generate anything, which keeps the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment