Hi guys,

The code used to validate a case insensitive answer makes uses of strtolower() as we can see here:

 function captcha_validate_case_insensitive_ignore_spaces($solution, $response) {
  return preg_replace('/\s/', '', strtolower($solution)) === preg_replace('/\s/', '', strtolower($response));

I think we should be using drupal_strtolower() instead as that drupal function may instead make use of the multi-byte strtolower() which supports all languages (at least all those defined in Unicode.)

Just in case you accepted the change, there is another function doing the same thing in the captcha.module file:

function captcha_validate_case_insensitive_equality($solution, $response) {
  return strtolower($solution) === strtolower($response);

Thank you.
Alexis Wilke

captcha-6.x-strtolower.patch852 bytesAlexisWilke
PASSED: [[SimpleTest]]: [MySQL] 733 pass(es).
[ View ]


soxofaan’s picture

Status:Needs review» Fixed

committed to D6 and D7 version

Status:Fixed» Closed (fixed)

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