aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGreg Froese <greg.froese@gmail.com>2009-06-05 19:47:32 +0000
committerGreg Froese <greg.froese@gmail.com>2009-06-05 19:47:32 +0000
commit21165f5f200b122389ef3feb9a23e647a64fa46b (patch)
tree1b9768d8d95453482478b79622655566e96c4731 /lib
parent8e8e50d510608d94e266e3c951349a45046dfc67 (diff)
downloadelgg-21165f5f200b122389ef3feb9a23e647a64fa46b.tar.gz
elgg-21165f5f200b122389ef3feb9a23e647a64fa46b.tar.bz2
sanitize watermark base filename to support spaces in username
Diffstat (limited to 'lib')
-rw-r--r--lib/watermark.php1
1 files changed, 1 insertions, 0 deletions
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();