gourami
gourami copied to clipboard
Show validation errors on registration form
When registering a new account on a local development instance the registration kept failing for me. Eventually I poked through the code and found that a password complexity check is performed and my test password of password
was unsurprisingly too weak.
The code in question is as follows from do_register
in lib.rs
:
if form.validate().is_err() {
// TODO catch better
return do_login(LoginForm {
username: form.username,
password: form.password,
});
}
I note the TODO is already there but figured it was worth extracting it to an issue for tracking.
Thanks for the bug report! This is on my TODO for sure -- the code around error handling is a bit sloppy and I'll have to fix it a bit to resolve this. I also feel somewhat ambivalent about using the zxcvbn library, simply because I'm trying to limit dependencies. I will probably resolve this in a batch with some other error reporting stuff