From 1b1ebd2f70c8471d78b0165e2e91cd79c8671a4f Mon Sep 17 00:00:00 2001 From: David Sterry Date: Sun, 4 Jul 2021 17:51:08 -0700 Subject: [PATCH] make captcha case-insensitive --- crates/websocket/src/handlers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/websocket/src/handlers.rs b/crates/websocket/src/handlers.rs index 055129cd3..5c3a1735c 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);