From 21165f5f200b122389ef3feb9a23e647a64fa46b Mon Sep 17 00:00:00 2001 From: Greg Froese Date: Fri, 5 Jun 2009 19:47:32 +0000 Subject: sanitize watermark base filename to support spaces in username --- lib/watermark.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/watermark.php b/lib/watermark.php index 4aa719aea..ddc41a36b 100644 --- a/lib/watermark.php +++ b/lib/watermark.php @@ -30,6 +30,7 @@ function tp_watermark($thumbs) { $user_stamp_base = tp_get_img_dir(); $user_stamp_base .= strtolower($viewer->name . "_" . $watermark_filename . "_stamp"); + $user_stamp_base .= preg_replace("/[^\w-]+/", "-", $user_stamp_base); if( !file_exists( $user_stamp_base . $ext )) { //create the watermark if it doesn't exist $commands = array(); -- cgit v1.2.3