mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-30 12:07:09 +00:00
92_FileLog.pm: Fix CVE-2020-19360 (Forum #135959)
git-svn-id: https://svn.fhem.de/fhem/trunk@28210 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
7bc77d3797
commit
cfc8a4f15c
@ -711,6 +711,11 @@ FileLog_logWrapper($)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($file =~ m,.*/.*([^/]+$),) { # 135959
|
||||||
|
Log 1, "ERROR: FileLog_logWrapper: / not allowed in filename ($file)";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if(defined($type) && $type eq "text") {
|
if(defined($type) && $type eq "text") {
|
||||||
$defs{$d}{logfile} =~ m,^(.*)/([^/]*)$,; # Dir and File
|
$defs{$d}{logfile} =~ m,^(.*)/([^/]*)$,; # Dir and File
|
||||||
my $path = "$1/$file";
|
my $path = "$1/$file";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user