php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45431 getimagesize() can't handle a colon in filename parameter
Submitted: 2008-07-04 13:38 UTC Modified: 2008-07-05 00:23 UTC
From: hundrambit at gmail dot com Assigned:
Status: Closed Package: GetImageSize related
PHP Version: 5.2.6 OS: Windows XP Professional + SP3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hundrambit at gmail dot com
New email:
PHP Version: OS:

 

 [2008-07-04 13:38 UTC] hundrambit at gmail dot com
Description:
------------
getimagesize() function will return FALSE when a remote file containing a colon (:) in filename is specified. It can't be handled / opened.

This image is used as example: http://inattack.ru/bar/inattack_bar_2012_2:10_FFFFFF_5_0.jpg

PHP configuration allows remote files.

Reproduce code:
---------------
$res = @getimagesize("http://inattack.ru/bar/inattack_bar_2012_2:10_FFFFFF_5_0.jpg");

if ($res === false) {
echo "Failed to open target image.";
} else {
echo "WxH: ".$res[0]."x".$res[1];
}

Expected result:
----------------
$res should return array with 5 elements, as it does when same image without a colon in filename is specified.

Actual result:
--------------
A FALSE is returned.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-05 00:23 UTC] hundrambit at gmail dot com
This information is invalid.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Sep 24 22:05:52 2022 UTC