Merge pull request #1812 from webmin/dev/fix-anonimous-user-test

Fix to test if anonymous user actually exists
This commit is contained in:
Jamie Cameron
2022-12-26 17:50:45 -08:00
committed by GitHub

View File

@@ -1959,8 +1959,8 @@ my $miniserv = { };
my @anon = split(/\s+/, $miniserv->{'anonymous'} || "");
my ($user, $found) = &get_anonymous_access($path, $miniserv);
return 1 if ($found >= 0); # Already setup
if (!$user) {
my $auser = grep { $_->{'name'} eq $user } &list_users();
if (!$auser) {
# Create a user if need be
$user = "anonymous";
my $uinfo = { 'name' => $user,