Browse Source

Add additional extension filtering

Visman 2 years ago
parent
commit
5be4d74045
1 changed files with 4 additions and 1 deletions
  1. 4 1
      app/Models/Pages/Admin/Groups.php

+ 4 - 1
app/Models/Pages/Admin/Groups.php

@@ -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;
             }
         }