From b9023a841debe115fb51bf1ca753cc97f065afc1 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Mon, 6 Nov 2023 12:35:56 +0200 Subject: [PATCH] Fix to treat variables as literals in `glob` (protect from any spaces and other special characters) --- extensions/file-manager/delete.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/file-manager/delete.cgi b/extensions/file-manager/delete.cgi index fbfeca6d9..cf5fb7a4e 100755 --- a/extensions/file-manager/delete.cgi +++ b/extensions/file-manager/delete.cgi @@ -55,7 +55,7 @@ foreach my $name (@entries_list) { my $tfile; if (!$mkpathr && -f "$tdir/$name" && -r "$tdir/$name") { $tfile = "$tdir/$name-$time"; - } elsif (!$mkpathr && glob("$tdir/$name/*")) { + } elsif (!$mkpathr && glob("\Q$tdir/$name\E/*")) { $tfile = "$tdir/$name-$time"; &$mkpath_($tdir); }