mirror of https://github.com/LemmyNet/lemmy.git
make captcha case-insensitive
parent
469a2b5c90
commit
1b1ebd2f70
|
@ -249,7 +249,7 @@ impl Handler<CheckCaptcha> for ChatServer {
|
||||||
let check = self
|
let check = self
|
||||||
.captchas
|
.captchas
|
||||||
.iter()
|
.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)
|
// Remove this uuid so it can't be re-checked (Checks only work once)
|
||||||
self.captchas.retain(|x| x.uuid != msg.uuid);
|
self.captchas.retain(|x| x.uuid != msg.uuid);
|
||||||
|
|
Loading…
Reference in New Issue