alexwennerberg / gourami

A decentralized social network for the small web, implemented in ActivityPub
GNU Affero General Public License v3.0
94 stars 5 forks source link

Show validation errors on registration form #19

Open wezm opened 4 years ago

wezm commented 4 years ago

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.

alexwennerberg commented 4 years ago

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