Check user and group names
authorJamie Cameron <jcameron@webmin.com>
Fri, 18 Dec 2009 21:10:58 +0000 (13:10 -0800)
committerJamie Cameron <jcameron@webmin.com>
Fri, 18 Dec 2009 21:10:58 +0000 (13:10 -0800)
quota/group_filesys.cgi
quota/lang/en
quota/user_filesys.cgi

index 2ce8da9..4dab5e0 100755 (executable)
@@ -5,6 +5,7 @@
 require './quota-lib.pl';
 &ReadParse();
 $u = $in{'group'};
+$u =~ /\S/ || &error($text{'gfilesys_enone'});
 &can_edit_group($u) ||
        &error(&text('gfilesys_ecannot', $u));
 &ui_print_header(undef, $text{'gfilesys_title'}, "", "group_filesys");
index 292835b..f6f737f 100644 (file)
@@ -129,6 +129,7 @@ gfilesys_edit=Edit Quota On:
 gfilesys_copy=Copy Quotas
 gfilesys_editdesc=View and edit the quotas for this group on some other filesystem that it currently does not have quotas on.
 gfilesys_copydesc=Copy quota limits for this group on all filesystems to some or all other groups.
+gfilesys_enone=No group name entered
 
 ggracef_title=Grace Times
 ggracef_return=group list
@@ -222,6 +223,7 @@ ufilesys_editdesc=View and edit the quotas for this user on some other filesyste
 ufilesys_copydesc=Copy quota limits for this user on all filesystems to some or all other users.
 ufilesys_copy=Copy Quotas
 ufilesys_grace=Grace
+ufilesys_enone=No username entered
 
 ugracef_title=Grace Times
 ugracef_return=user list
index 5d1fd08..d483abd 100755 (executable)
@@ -5,6 +5,7 @@
 require './quota-lib.pl';
 &ReadParse();
 $u = $in{'user'};
+$u =~ /\S/ || &error($text{'ufilesys_enone'});
 &can_edit_user($u) ||
        &error(&text('ufilesys_ecannot', $u));
 &ui_print_header(undef, $text{'ufilesys_title'}, "", "user_filesys");