comparison mod_password_policy/mod_password_policy.lua @ 845:1c14edca74a4

mod_password_policy: Fix inverted length check.
author Waqas Hussain <waqas20@gmail.com>
date Sat, 06 Oct 2012 19:25:53 +0500
parents 0649883de4d3
children cb26d04b391c
comparison
equal deleted inserted replaced
844:a0987c0e4e1d 845:1c14edca74a4
15 options.length = options.length or 8; 15 options.length = options.length or 8;
16 16
17 local st = require "util.stanza"; 17 local st = require "util.stanza";
18 18
19 function check_password(password) 19 function check_password(password)
20 return #password <= options.length; 20 return #password >= options.length;
21 end 21 end
22 22
23 function handler(event) 23 function handler(event)
24 local origin, stanza = event.origin, event.stanza; 24 local origin, stanza = event.origin, event.stanza;
25 25