From 578026e7bbc7aecddee90a8c1d1ecf758444c1e9 Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 17 Jan 2005 19:11:50 +0000 Subject: - bug fixed : in thumbnail creation process, only files with filename authorized by PhpWebGallery are listed git-svn-id: http://piwigo.org/svn/trunk@703 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/thumbnail.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'admin/thumbnail.php') diff --git a/admin/thumbnail.php b/admin/thumbnail.php index 60982caa6..3e1b78f98 100644 --- a/admin/thumbnail.php +++ b/admin/thumbnail.php @@ -213,6 +213,14 @@ foreach ($fs['elements'] as $path) { $dirname = dirname($path); $filename = basename($path); + + // only files matching the authorized filename pattern can be considered + // as "without thumbnail" + if (!preg_match('/^[a-zA-Z0-9-_.]+$/', $filename)) + { + continue; + } + // searching the element $filename_wo_ext = get_filename_wo_extension($filename); $tn_ext = ''; -- cgit v1.2.3