diff options
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 1 | ||||
-rw-r--r-- | phpBB/includes/functions_compress.php | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 213e8fd9e0..7b8d8f63f2 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -101,6 +101,7 @@ <li>[Fix] Minor language fixes. (Bug #54855)</li> <li>[Fix] Parsing urls in signatures properly uses config settings. (Bug #57105)</li> <li>[Fix] Allow multibyte keys in request_var(). (Bug #51555)</li> + <li>[Fix] Prevent wrong tar archive type detection. (Bug #12531)</li> <li>[Fix] Correct redirection after login to forum not in web root (Bug #58755)</li> <li>[Feature] Support for Microsoft's Native SQL Server Driver for PHP (Bug #57055 - Patch by Chris Pucci at Microsoft)</li> </ul> diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php index f17c780a65..f422eaa8c1 100644 --- a/phpBB/includes/functions_compress.php +++ b/phpBB/includes/functions_compress.php @@ -502,8 +502,8 @@ class compress_tar extends compress function compress_tar($mode, $file, $type = '') { $type = (!$type) ? $file : $type; - $this->isgz = (strpos($type, '.tar.gz') !== false || strpos($type, '.tgz') !== false) ? true : false; - $this->isbz = (strpos($type, '.tar.bz2') !== false) ? true : false; + $this->isgz = preg_match('#(\.tar\.gz|\.tgz)$#', $type); + $this->isbz = preg_match('#\.tar\.bz2$#', $type); $this->mode = &$mode; $this->file = &$file; |