aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-01-17 19:11:50 +0000
committerplegall <plg@piwigo.org>2005-01-17 19:11:50 +0000
commit578026e7bbc7aecddee90a8c1d1ecf758444c1e9 (patch)
treeb51129e8e399ae4c38e6f5b69c74e68b7d29613f /admin
parent30002c53eabebc842bdf7d63469737bfbf0ecbb5 (diff)
- 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
Diffstat (limited to '')
-rw-r--r--admin/thumbnail.php8
1 files changed, 8 insertions, 0 deletions
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 = '';