From 540ba53762eec43673b8f6ec7fbdaee828789158 Mon Sep 17 00:00:00 2001 From: Aera23 <130415001+Aera23@users.noreply.github.com> Date: Fri, 30 Oct 2026 16:12:55 +1030 Subject: [PATCH] Optional accessible CAPTCHA better than disabling the captcha when used for people who require more accessibility. --- chat.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/chat.php b/chat.php index adfe350..e39bce4 100644 --- a/chat.php +++ b/chat.php @@ -685,8 +685,11 @@ function send_captcha(): void } elseif ($difficulty===7 || $difficulty===8 || $difficulty===10) { echo _('Type the five largest characters:'); } else { - echo _('Type the characters in the image:'); + if($difficulty===-1){ echo _('Type '.$code);} + else{echo _('Type the characters in the image:');} } + if($difficulty===-1){$im=false;} + else{ if($difficulty===1 || $difficulty===2 || $difficulty===4){ // optionally use custom GD font for simple, moderate and extreme captchas if (get_setting('captchagdfont') === '') { @@ -964,7 +967,7 @@ function send_captcha(): void ob_start(); imagepng($im); imagedestroy($im); - echo base64_encode(ob_get_clean()).'">'; + echo base64_encode(ob_get_clean()).'">';} echo '