Fixed a path transversal problem.
Some checks failed
Test CloudVista on Ubuntu Latest / test (push) Has been cancelled
Some checks failed
Test CloudVista on Ubuntu Latest / test (push) Has been cancelled
This commit is contained in:
@@ -112,6 +112,7 @@ sub safe_name {
|
|||||||
my $n = basename(shift || '');
|
my $n = basename(shift || '');
|
||||||
$n =~ s/[^\w.\-]/_/g;
|
$n =~ s/[^\w.\-]/_/g;
|
||||||
$n =~ s/^\./dot_/;
|
$n =~ s/^\./dot_/;
|
||||||
|
$n =~ s!/!_!g;
|
||||||
return length($n) ? $n : 'file';
|
return length($n) ? $n : 'file';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user