mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Fix to check if internally sourced file is under user home
This commit is contained in:
@@ -97,7 +97,10 @@ if ($shinit) {
|
||||
$sourced_file =~ s/\s+$//;
|
||||
$sourced_file =~ s/^\~\///;
|
||||
push(@{$shfiles}, $sourced_file)
|
||||
if (!grep(/^$sourced_file$/, @{$shfiles}));
|
||||
if (!grep(/^$sourced_file$/, @{$shfiles}) &&
|
||||
($sourced_file !~ /^\// ||
|
||||
$sourced_file =~ /^\// &&
|
||||
&is_under_directory($uinfo[7], $sourced_file)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user