Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-9504

Allow gallery avatars with whitespaces in the filename

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.7-PL1
    • Fix Version/s: 3.0.8-RC1
    • Labels:
      None

      Description

      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'])); 

        Activity

        Hide
        Eelke Eelke Blok [X] (Inactive) added a comment -

        I inadvertently left the priority at "Major" (first issue reported in the new tracker), but it seems I can not edit the original report.

        Show
        Eelke Eelke Blok [X] (Inactive) added a comment - I inadvertently left the priority at "Major" (first issue reported in the new tracker), but it seems I can not edit the original report.
        Hide
        Eelke Eelke Blok [X] (Inactive) added a comment -

        The same user reports they've had to add

        $sql_ary['user_avatar'] = $category . '/' . $sql_ary['user_avatar'];

        to make it work. They have spaces in the directory names for the categories as well, nit sure if that is a factor.

        Show
        Eelke Eelke Blok [X] (Inactive) added a comment - The same user reports they've had to add $sql_ary [ 'user_avatar' ] = $category . '/' . $sql_ary [ 'user_avatar' ]; to make it work. They have spaces in the directory names for the categories as well, nit sure if that is a factor.
        Hide
        bantu Andreas Fischer added a comment -

        Adjusted commit message to include link to this ticket, changed [bug/9504] to [ticket/9504], changed commit message to be no longer than 80 characters per line.

        Show
        bantu Andreas Fischer added a comment - Adjusted commit message to include link to this ticket, changed [bug/9504] to [ticket/9504] , changed commit message to be no longer than 80 characters per line.
        Hide
        bantu Andreas Fischer added a comment -

        Plus, I removed the edit to phpBB/docs/CHANGELOG.html.

        Show
        bantu Andreas Fischer added a comment - Plus, I removed the edit to phpBB/docs/CHANGELOG.html.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development