aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2010-03-06 18:10:49 +0100
committerNils Adermann <naderman@naderman.de>2010-03-07 21:56:07 +0100
commit62e0c325b48046e3503cd3b9f60c3c7371dedfc1 (patch)
tree9c17b6a3ba39a998fdd1bb2a50843c845ee85bb0
parent568fb83373361abb8c9f3886fee944a8d9e5f66d (diff)
parent5cfa3544334907f7b5eac6b2cc5f38ab067db634 (diff)
downloadforums-62e0c325b48046e3503cd3b9f60c3c7371dedfc1.tar
forums-62e0c325b48046e3503cd3b9f60c3c7371dedfc1.tar.gz
forums-62e0c325b48046e3503cd3b9f60c3c7371dedfc1.tar.bz2
forums-62e0c325b48046e3503cd3b9f60c3c7371dedfc1.tar.xz
forums-62e0c325b48046e3503cd3b9f60c3c7371dedfc1.zip
Merge branch 'bug/evil3/12531' into develop-olympus
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/includes/functions_compress.php4
2 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index e54c4fd9bb..49c8d1364b 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>[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;