From d589db2ed9b915b9f326c06a3405d5791ec910fd Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Tue, 27 Apr 2021 21:10:15 -0400 Subject: [PATCH] login: missing parameters are 400s --- src/lib/Hydra/Controller/User.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Hydra/Controller/User.pm b/src/lib/Hydra/Controller/User.pm index b3512a1b..a07a3c42 100644 --- a/src/lib/Hydra/Controller/User.pm +++ b/src/lib/Hydra/Controller/User.pm @@ -27,8 +27,8 @@ sub login_POST { my $username = $c->stash->{params}->{username} // ""; my $password = $c->stash->{params}->{password} // ""; - error($c, "You must specify a user name.") if $username eq ""; - error($c, "You must specify a password.") if $password eq ""; + badRequest($c, "You must specify a user name.") if $username eq ""; + badRequest($c, "You must specify a password.") if $password eq ""; if ($c->get_auth_realm('ldap') && $c->authenticate({username => $username, password => $password}, 'ldap')) { doLDAPLogin($self, $c, $username);