mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-22 14:45:10 +00:00
Merge pull request #1649 from weex/case-insensitive-captcha
make captcha case-insensitive
This commit is contained in:
commit
8c957ca939
|
@ -249,7 +249,7 @@ impl Handler<CheckCaptcha> 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);
|
||||
|
|
Loading…
Reference in a new issue