Block files with dangerous names from coming in via Storage untar.
This commit is contained in:
parent
9f724a7193
commit
13a222f6ce
3 changed files with 20 additions and 3 deletions
|
|
@ -1844,6 +1844,13 @@ sub untar {
|
|||
}, ".");
|
||||
$self->_changeOwner(@files);
|
||||
|
||||
##Prevent dangerous files from being added to the storage location via untar
|
||||
FILE: foreach my $file (@files) {
|
||||
my $blockname = $temp->block_extensions($file);
|
||||
next FILE if $blockname eq $file;
|
||||
$temp->renameFile($file, $blockname);
|
||||
}
|
||||
|
||||
chdir $originalDir;
|
||||
return $temp;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue