Issue #3195939 by mcdruid: hardening of destructor in Archive_Tar

merge-requests/471/head
mcdruid 2021-03-23 21:17:38 +00:00
parent b46ff05b40
commit c9bbfd630a
1 changed files with 1 additions and 1 deletions

View File

@ -280,7 +280,7 @@ class Archive_Tar
{
$this->_close();
// ----- Look for a local copy to delete
if ($this->_temp_tarname != '') {
if ($this->_temp_tarname != '' && (bool) preg_match('/^tar[[:alnum:]]*\.tmp$/', $this->_temp_tarname)) {
@drupal_unlink($this->_temp_tarname);
}
}