author | Matthew Wild <mwild1@gmail.com> |
Tue, 09 Oct 2018 14:02:42 +0100 | |
changeset 3354 | cb26d04b391c |
parent 3353 | 35dc7c38e362 |
child 3355 | 662f2722f745 |
--- a/mod_password_policy/mod_password_policy.lua Sun Oct 07 03:39:35 2018 +0200 +++ b/mod_password_policy/mod_password_policy.lua Tue Oct 09 14:02:42 2018 +0100 @@ -17,7 +17,10 @@ local st = require "util.stanza"; function check_password(password) - return #password >= options.length; + if #password < options.length then + return nil, ("Password is too short (minimum %d characters)"):format(options.length); + end + return true; end function handler(event)