diff --git a/acl/acl-lib.pl b/acl/acl-lib.pl index d56c1b11a..7a03bdfa0 100755 --- a/acl/acl-lib.pl +++ b/acl/acl-lib.pl @@ -362,6 +362,7 @@ sub create_user my ($user, $clone) = @_; my %miniserv; my @mods = &list_modules(); +$user->{'name'} eq "webmin" && &error("Invalid username webmin for new user"); &get_miniserv_config(\%miniserv); @@ -530,6 +531,8 @@ sub modify_user my ($username, $user) = @_; my (%miniserv, @pwfile, @acl, @mods, $m); &get_miniserv_config(\%miniserv); +$user->{'name'} eq "webmin" && + &error("Invalid username webmin for modified user"); if ($user->{'proto'}) { # In users and groups DB diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index 06bbd06aa..682a7e73b 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -4134,6 +4134,7 @@ sub save_module_acl { my $u = defined($_[1]) ? $_[1] : $base_remote_user; my $m = defined($_[2]) ? $_[2] : &get_module_name(); +$u eq "webmin" && &error("Invalid username webmin for ACL"); if (!$_[3] && &foreign_check("acl")) { # Check if this user is a member of a group, and if he gets the # module from a group. If so, update its ACL as well