From c9bbfd630aa0203f1dfdf21c93bc1c85623f3d77 Mon Sep 17 00:00:00 2001 From: mcdruid Date: Tue, 23 Mar 2021 21:17:38 +0000 Subject: [PATCH] Issue #3195939 by mcdruid: hardening of destructor in Archive_Tar --- modules/system/system.tar.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/system.tar.inc b/modules/system/system.tar.inc index 0af6275b401..7a0719e5850 100644 --- a/modules/system/system.tar.inc +++ b/modules/system/system.tar.inc @@ -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); } }