Explorar o código

Add additional extension filtering

Visman %!s(int64=2) %!d(string=hai) anos
pai
achega
5be4d74045
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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) {
         foreach ($exts as $ext) {
             $ext = \trim($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;
                 $result[] = $ext;
             }
             }
         }
         }