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

Unable to get image size in img bbcode when URL has multiple parameters.

    Details

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

      Description

      I'm trying to put the image in bbcode like this:

      [img]http://forum.kia-club.ru/gallery/image.php?album_id=18&image_id=23662[/img]

      and get the error message: "It was not possible to determine the dimensions of the image."
      Fixed by change in the includes/message_parser.php the string

      			$stats = @getimagesize($in);

      to

      			$stats = @getimagesize(html_entity_decode($in));

        Activity

        Hide
        Semik Semen Panevin [X] (Inactive) added a comment -

        http://www.phpbbguru.net/community/topic16064-330.html#p274887

        I think should be htmlspecialchars_decode() instead of html_entity_decode()

        Show
        Semik Semen Panevin [X] (Inactive) added a comment - http://www.phpbbguru.net/community/topic16064-330.html#p274887 I think should be htmlspecialchars_decode() instead of html_entity_decode()
        Hide
        nissin nissin added a comment -

        You are right, the htmlspecialchars_decode() is better.

        Show
        nissin nissin added a comment - You are right, the htmlspecialchars_decode() is better.
        Hide
        bantu Andreas Fischer added a comment -

        Valid issue, I actually noticed that myself long long long ago. o_O

        Possible locations where this can be an issue.

        ./includes/functions_posting.php:	$dimension = @getimagesize($source);
        ./includes/functions_user.php:	if (($image_data = @getimagesize($data['remotelink'])) === false && (empty($data['width']) || empty($data['height'])))
        ./includes/functions_user.php:	if (($image_data = @getimagesize($avatar)) === false)
        ./includes/functions_content.php:							$dimension = @getimagesize($filename);
        ./includes/functions_content.php:					list($width, $height) = @getimagesize($filename);
        ./includes/functions_convert.php:		return @getimagesize($image);
        ./includes/functions_convert.php:		$remote_avatar_cache[$src] = @getimagesize($src);
        ./includes/functions_upload.php:			if (($this->image_info = @getimagesize($this->destination_file)) !== false)
        ./includes/message_parser.php:			$stats = @getimagesize(htmlspecialchars_decode($in));
        ./download/file.php:		$image_data = @getimagesize($file_path);
        

        Show
        bantu Andreas Fischer added a comment - Valid issue, I actually noticed that myself long long long ago. o_O Possible locations where this can be an issue. ./includes/functions_posting.php: $dimension = @getimagesize($source); ./includes/functions_user.php: if (($image_data = @getimagesize($data['remotelink'])) === false && (empty($data['width']) || empty($data['height']))) ./includes/functions_user.php: if (($image_data = @getimagesize($avatar)) === false) ./includes/functions_content.php: $dimension = @getimagesize($filename); ./includes/functions_content.php: list($width, $height) = @getimagesize($filename); ./includes/functions_convert.php: return @getimagesize($image); ./includes/functions_convert.php: $remote_avatar_cache[$src] = @getimagesize($src); ./includes/functions_upload.php: if (($this->image_info = @getimagesize($this->destination_file)) !== false) ./includes/message_parser.php: $stats = @getimagesize(htmlspecialchars_decode($in)); ./download/file.php: $image_data = @getimagesize($file_path);
        Hide
        bantu Andreas Fischer added a comment -

        Hmm. Avatar upload doesn't seem to allow you to use URLs with parameters.

        Show
        bantu Andreas Fischer added a comment - Hmm. Avatar upload doesn't seem to allow you to use URLs with parameters.

          People

          • Assignee:
            bantu Andreas Fischer
            Reporter:
            nissin nissin
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development