Commit 1a4dcc8e authored by Henning Leutz's avatar Henning Leutz 🥋

refactor: #955

parent c9e61daf
......@@ -349,22 +349,21 @@ class Manager
}
/**
* @param $values
* @param $str
* @param string $values
* @param string $str
*
* @return bool
*/
protected function checkFnMatch($values, $str)
{
if (empty($configAllowedTypes)) {
if (empty($values)) {
return true;
}
$configAllowedTypes = \explode(',', $configAllowedTypes);
$fileType = $_REQUEST['filetype'];
$values = \explode(',', $values);
foreach ($configAllowedTypes as $type) {
if (\fnmatch($type, $fileType)) {
foreach ($values as $type) {
if (\fnmatch($type, $str)) {
return true;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment