Add additional extension filtering

This commit is contained in:
Visman 2023-07-11 18:13:09 +07:00
parent 94427053f1
commit 5be4d74045

View file

@ -336,7 +336,10 @@ class Groups extends Admin
foreach ($exts as $ext) {
$ext = \trim($ext);
if (\preg_match('%^[a-z0-9]+(?:[_-]+[a-z0-9]+)*$%iD', $ext)) {
if (
\preg_match('%^[a-z0-9]+(?:[_-]+[a-z0-9]+)*$%iD', $ext)
&& ! \preg_match($this->c->attachments::BAD_EXTS, $ext)
) {
$result[] = $ext;
}
}