Skip to content

Commit

Permalink
Dev: removed limitation on file multiple extensions (for minified fil…
Browse files Browse the repository at this point in the history
…es, map of minified files, etc). The security issue was for old PHP versions with specific mod.
  • Loading branch information
LouisGac committed Jul 18, 2018
1 parent 5072238 commit 165c835
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions application/helpers/admin/template_helper.php
Expand Up @@ -132,15 +132,10 @@ function templateExtractFilter($p_event, &$p_header)
$aAllowExtensions = explode(',', Yii::app()->getConfig('allowedthemeuploads'));
$aAllowExtensions[] = 'twig';
$info = pathinfo($p_header['filename']);
// Deny files with multiple extensions in general
if (substr_count($info['basename'], '.') > 1) {
return 0;
}

if ($p_header['folder'] || !isset($info['extension']) || in_array($info['extension'], $aAllowExtensions)) {
return 1;
} else {
return 0;
}
}

1 comment on commit 165c835

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\o/

Please sign in to comment.