From: Errietta Kostala Date: Mon, 26 Jan 2015 14:36:31 +0000 (+0000) Subject: Die gracefully on too short passwords. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=715104f10a2e7e000b007a2d42cfb96c37e46292;p=scpubgit%2Fstemmaweb.git Die gracefully on too short passwords. --- diff --git a/lib/stemmaweb/Authentication/FormHandler.pm b/lib/stemmaweb/Authentication/FormHandler.pm index 04557ae..0129b13 100644 --- a/lib/stemmaweb/Authentication/FormHandler.pm +++ b/lib/stemmaweb/Authentication/FormHandler.pm @@ -15,5 +15,16 @@ has_field id_token => ( required => 0, ); +# This must match the min length in Text::Tradition::Directory! + +has_field password => ( + type => 'Password', + minlength => 8, + required => 1, + messages => { required => 'Your password is required.' }, + tags => { no_errors => 1 }, + wrapper_attr => { id => 'field-password', }, + inactive => 1, +); 1;