Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-9504

Allow gallery avatars with whitespaces in the filename

XMLWordPrintable

      It seems a fix introduced in 3.0.6 was not followed through correctly: http://tracker.phpbb.com/browse/PHPBB3-8317

      I have not experienced the issue myself, but it was reported on the Dutch support forum. What is strange, though, is that the user claims they have been using avatars with spaces succesfully before updating to 3.0.6, while the bug fix claims it is needed to be able to use avatars with spaces at all.

      Anyway, the attached screenshot is from the support request. It would seem that if the following change is made, it should resolve the issue (untested):

      Open includes/functions_user.php

      Find

      list($sql_ary['user_avatar_width'], $sql_ary['user_avatar_height']) = getimagesize($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category . '/' . $sql_ary['user_avatar']);

      Replace with

      list($sql_ary['user_avatar_width'], $sql_ary['user_avatar_height']) = getimagesize($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category . '/' . rawurldecode($sql_ary['user_avatar'])); 

            Kellanved Kellanved [X] (Inactive)
            Eelke Eelke Blok [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: