Case insensitive extension check, removed problematic whitelist

This commit is contained in:
Gabor Gyorvari
2016-12-29 08:31:27 +01:00
parent 5675fb8e79
commit b522a23a74
2 changed files with 3 additions and 4 deletions

View File

@@ -46,7 +46,7 @@ class MalwareScanner
if ($ext[0] != '.') {
$ext = '.' . $ext;
}
$this->extension = $ext;
$this->extension = strtolower($ext);
}
if (isset($options['hide-ok'])) {
$this->flagHideOk = true;
@@ -116,7 +116,7 @@ class MalwareScanner
if (is_dir($dir . $file)) {
$this->process($dir . $file . '/');
} elseif (is_file($dir . $file)) {
$ext = substr($file, strrpos($file, '.'));
$ext = strtolower(substr($file, strrpos($file, '.')));
if ($ext == $this->extension) {
$this->scan($dir . $file);
}