Detect bogus user
authorJamie Cameron <jcameron@webmin.com>
Mon, 16 Mar 2009 22:55:08 +0000 (22:55 +0000)
committerJamie Cameron <jcameron@webmin.com>
Mon, 16 Mar 2009 22:55:08 +0000 (22:55 +0000)
cluster-passwd/edit_passwd.cgi
cluster-passwd/lang/en

index 9620df2..a00b63f 100755 (executable)
@@ -7,6 +7,7 @@ require './cluster-passwd-lib.pl';
 
 @ulist = &get_all_users();
 ($user) = grep { $_->{'user'} eq $in{'user'} } @ulist;
+$user || &error($text{'passwd_euser'});
 
 &can_edit_passwd($user) || &error($passwd::text{'passwd_ecannot'});
 
index ad04bb0..ade2739 100644 (file)
@@ -5,4 +5,4 @@ index_hosts=All password changes made using this module will be done on all $1 h
 passwd_err=Failed to change password
 passwd_title=Changing Password
 passwd_on=Changing password on $1 ..
-
+passwd_euser=User does not exist!