Commit 093e156
committed
turn error codes into enums + check empty credentials before login
Using enums instead of hard coded numbers for error codes should
help with readability, even though they're local to the functions
that use them to avoid flooding the namespace.
Checking whether credentials are empty before login will prevent
error messages such as "account disabled" from showing up when no
account is specified, which may look weird. It'll also avoid any
database reads although this shouldn't really make a difference
torwards performance or security since it's only an edge case.1 parent d36b263 commit 093e156
1 file changed
Lines changed: 157 additions & 61 deletions
0 commit comments