commit 087954008082899cf9772fded6d1aadca2bbf039
parent 0c3acdb059fc46a861f5238cded958d3f61d525f
Author: uriel@soma <unknown>
Date: Sat, 28 Feb 2009 12:56:13 +0000
Be more careful when checking passwords, make sure that the password file exists and is not empty.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/werclib.rc b/bin/werclib.rc
@@ -68,7 +68,7 @@ fn auth_user {
status=('Auth: missing user name or pass: '^$"user_name^' / '^$"user_password)
if not if(! test -f $pfile)
status=('Auth: cant find '^$pfile)
- if not if(! ~ $user_password `{cat $pfile})
+ if not if(! test -s $pfile || ! ~ $user_password `{cat $pfile})
status=('Auth: Pass '$user_password' doesnt match '^`{cat $pfile})
if not {
logged_user=$user_name