From: David Sterry Date: Mon, 5 Jul 2021 00:51:08 +0000 (-0700) Subject: make captcha case-insensitive X-Git-Url: http://these/git/readmes/%24%7B%60data:application/%7BpictrsAvatarThumbnail%28this.props.site.site.icon%29%7D?a=commitdiff_plain;h=1b1ebd2f70c8471d78b0165e2e91cd79c8671a4f;p=lemmy.git make captcha case-insensitive --- diff --git a/crates/websocket/src/handlers.rs b/crates/websocket/src/handlers.rs index 055129cd..5c3a1735 100644 --- a/crates/websocket/src/handlers.rs +++ b/crates/websocket/src/handlers.rs @@ -249,7 +249,7 @@ impl Handler for ChatServer { let check = self .captchas .iter() - .any(|r| r.uuid == msg.uuid && r.answer == msg.answer); + .any(|r| r.uuid == msg.uuid && r.answer.to_lowercase() == msg.answer.to_lowercase()); // Remove this uuid so it can't be re-checked (Checks only work once) self.captchas.retain(|x| x.uuid != msg.uuid);