From: Marcel Werk Date: Mon, 26 Feb 2024 12:22:49 +0000 (+0100) Subject: Answers to captcha questions are no longer case-sensitive X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c81d3283a6e9ea31b24ff94c952d2638bc8651a8;p=GitHub%2FWoltLab%2FWCF.git Answers to captcha questions are no longer case-sensitive --- diff --git a/wcfsetup/install/files/lib/data/captcha/question/CaptchaQuestion.class.php b/wcfsetup/install/files/lib/data/captcha/question/CaptchaQuestion.class.php index f71ea1685f..0c3fe3b810 100644 --- a/wcfsetup/install/files/lib/data/captcha/question/CaptchaQuestion.class.php +++ b/wcfsetup/install/files/lib/data/captcha/question/CaptchaQuestion.class.php @@ -43,12 +43,12 @@ class CaptchaQuestion extends DatabaseObject $answers = \explode("\n", StringUtil::unifyNewlines(WCF::getLanguage()->get($this->answers))); foreach ($answers as $__answer) { if (\mb_substr($__answer, 0, 1) == '~' && \mb_substr($__answer, -1, 1) == '~') { - if (Regex::compile(\mb_substr($__answer, 1, \mb_strlen($__answer) - 2))->match($answer)) { + if (Regex::compile(\mb_substr($__answer, 1, \mb_strlen($__answer) - 2), Regex::CASE_INSENSITIVE)->match($answer)) { return true; } continue; - } elseif ($__answer == $answer) { + } elseif (\mb_strtolower($__answer) == \mb_strtolower($answer)) { return true; } }