From aef49fb30f5cd0fed2d2a0a67f1184b6d1675514 Mon Sep 17 00:00:00 2001 From: Stefan Brand Date: Tue, 11 Jan 2022 17:52:40 +0100 Subject: [PATCH] Filter Unsupported Files --- index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.php b/index.php index e67ffac..62be6eb 100644 --- a/index.php +++ b/index.php @@ -57,6 +57,8 @@ if (isset($_SESSION[$cdir]) $rmdirs[] = '.'; $rmdirs[] = '..'; $files = array_diff(scandir($imagedir.$dir, SCANDIR_SORT_DESCENDING), $rmdirs); + // Filter Unsupported Files + $files = array_values(preg_grep('/.*\.(?!(webm|sh)).*/i', $files)); $_SESSION[$cdir]['f'] = $files; $_SESSION[$cdir]['d'] = $dirs; $_SESSION[$cdir]['t'] = time();