Problem/Motivation
Execution of riddler fails with php crash
Steps to reproduce
Create a riddle, put it in a form and try it!
Proposed resolution
Either include the captcha constants in the riddler module, or hard-code the values in the module file.
replace this:
switch (\Drupal::config('captcha.settings')->get('default_validation')) {
case CAPTCHA_DEFAULT_VALIDATION_CASE_SENSITIVE:
return in_array($captcha_response, $solutions);
case CAPTCHA_DEFAULT_VALIDATION_CASE_INSENSITIVE:
return in_array(strtolower($captcha_response), $isolutions);
}
with this:
switch (\Drupal::config('captcha.settings')->get('default_validation')) {
case 0:
return in_array($captcha_response, $solutions);
case 1:
return in_array(strtolower($captcha_response), $isolutions);
}| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 3378590-12.patch | 15.62 KB | keshavv |
| #10 | 3378590-10.patch | 8.38 KB | keshavv |
| #8 | 3378590-8.patch | 8.38 KB | keshavv |
| #6 | 3378590-6.patch | 887 bytes | keshavv |
Comments
Comment #2
keshavv commentedThis issue is already fixed. Please check with the latest code.
Thank you.
Comment #3
mlncn commentedThis is a critical issue and warrants a release before deeming it fixed, please.
Comment #4
mlncn commentedComment #5
megakeegman commentedThis error still occurs in the 2.x-dev branch
Comment #6
keshavv commentedCreated patch for
2.xbranch from 3.x as it is already fixed there.Please review.
Thank you.
Comment #8
keshavv commentedFix failed tests.
Comment #10
keshavv commentedFix PHPUnit test cases.
Comment #11
keshavv commentedComment #12
megakeegman commentedThanks very much, I have just tested the above patch (labeled patch 12 but in comment 11) and it appears to be working correctly on the 2.x branch.
Comment #13
anybodyThank you, we're on it!
Comment #14
anybodyThis is fixed in 3.x but due to the chances in CAPTCHA module, this now also needs to be fixed in 2.x
Comment #16
anybodyFixed, I'll tag a new 2.0.5 release. Thank you all!