Block files with dangerous names from coming in via Storage untar.

This commit is contained in:
Colin Kuskie 2010-08-11 15:46:02 -07:00
parent 9f724a7193
commit 13a222f6ce
3 changed files with 20 additions and 3 deletions

View file

@ -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;
}