Browse Source

Add additional extension filtering

Visman 2 năm trước cách đây
mục cha
commit
5be4d74045
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  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;
             }
         }