From 8690d25b4fab47853bcab46fc07ee577569c6822 Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Fri, 2 Jul 2010 13:41:52 +0200 Subject: [PATCH] [ticket/9504] Allow whitespaces in gallery avatars Gallery avatars are discovered on the server filesystem; to allow linking to the images, the filenames are urlencoded before being written to the database. However, getimagesize needs the decoded filename as input. PHPBB3-9504 --- phpBB/includes/functions_user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 271542efdd..f58e19ddbe 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -2348,7 +2348,7 @@ function avatar_process_user(&$error, $custom_userdata = false) } else { - list($sql_ary['user_avatar_width'], $sql_ary['user_avatar_height']) = getimagesize($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category . '/' . $sql_ary['user_avatar']); + list($sql_ary['user_avatar_width'], $sql_ary['user_avatar_height']) = getimagesize($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category . '/' . urldecode($sql_ary['user_avatar'])); $sql_ary['user_avatar'] = $category . '/' . $sql_ary['user_avatar']; } }