The vulnerability stems from how the CAPTCHA validation was conditionally skipped when the $code parameter was null in ajaxservice.php. The checkCaptchaCode function's original signature (string $code) would have caused a type error if called with null, but the surrounding code in ajaxservice.php explicitly avoided invoking it when $code was null. This allowed attackers to bypass CAPTCHA checks by omitting the code parameter. The patch modified the function to accept nullable strings and enforced the check even for null/empty values, closing the bypass. The function's original design (strict string parameter) indirectly enabled the bypass when combined with the flawed conditional logic in ajaxservice.php.