mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2025-01-30 08:58:23 +00:00
support all file etensions that Joomla is able to unpack (zip, tar, tgz, tbz2, tar.gz, tar.gzip, tar.bz2, tar.bzip2)
This commit is contained in:
parent
fa3ba35933
commit
3dd234ffde
@ -192,11 +192,9 @@ class JedcheckerControllerUploads extends JControllerLegacy
|
||||
{
|
||||
if ($file->isFile())
|
||||
{
|
||||
$extension = pathinfo($file->getFilename(), PATHINFO_EXTENSION);
|
||||
|
||||
if ($extension === 'zip')
|
||||
if (preg_match('/\.(?:zip|tar|tgz|tbz2|tar\.(?:gz|gzip|bz2|bzip2))$/', $file->getFilename(), $matches))
|
||||
{
|
||||
$unzip = $file->getPath() . '/' . $file->getBasename('.' . $extension);
|
||||
$unzip = $file->getPath() . '/' . $file->getBasename($matches[0]);
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -367,7 +367,7 @@ class JedcheckerRulesXMLFiles extends JEDcheckerRule
|
||||
}
|
||||
|
||||
// Extra check for unzipped files
|
||||
if (preg_match('/^(.*)\.(zip|tgz|tar\.gz)$/', $filename, $matches) && is_dir($matches[1]))
|
||||
if (preg_match('/^(.*)\.(?:zip|tar|tgz|tbz2|tar\.(?:gz|gzip|bz2|bzip2))$/', $filename, $matches) && is_dir($matches[1]))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user