We've switched to a new bug tracking system!
Project Tools has been set to read-only. Please use the new tracker going forward.
Invalid URL falsely returned Issue Tools
issueid=27278 Thu 29th Jan '09 4:04pm
Senior Member
Invalid URL falsely returned
For dynamic images

Class upload, function fetch_remote_filesize:

Code:
        if ($result = $vurl->exec2() AND $length = intval($result['content-length']))
        {
            return $length;
        }
        else
        {
            return false;
        }
Problems arise if the server does not report content length, such as with dynamic images. Example URL:

http://www.dailyfx.com/export/sites/...1-023_TTN2.jpg

I guess not necessarily a bug per say, just needs another level of checking I assume? Not my area of expertise here..
Issue Details
Project vBulletin
Category Attachments
Status Fixed (Closed)
Priority 7
Affected Version 3.8.1
Fixed Version 3.8.4
Users able to reproduce bug 0
Users unable to reproduce bug 1
Assigned Users Andy Huang
Tags fixed 3.7.7, fixed in 3.8.4

Fri 30th Jan '09 8:51am
Former vBulletin Developer
 
Confirmed for now, the problem is we do a HEAD request to get a size and then we set a hard limit on the expected length. The reason for this is to stop someone trying to download a 700mb ISO and using all the server bandwidth.

We can probably return -1 in this case and then modify the code to set a hard limit based on the maximum for that type.
Reply
Mon 6th Jul '09 11:18am
vBulletin Team
 
Fix implemented for next version. This fix will work ONLY if the server is returning a 200 OK response. If it uses some other response, and does not include a header, then we will still treat it as invalid url, as we have no way of knowing the contents (it could be an error page for all we know).
Reply
Mon 6th Jul '09 12:03pm
Senior Member
 
Wonderful!!!

Just wanted to post today that such URL like:
http://www.speedtest.net/result/491748294.png
can't be uploaded.

Looks like this one fix will fix :D it.

Andy, can you, please, provide us with the patch to test this one before release?

Thanks
Reply
Mon 6th Jul '09 12:47pm
vBulletin Team
 
Attached is the patch for this one. It's actually quite a simple fix, but we didn't merge it into the trunk for some time...
Reply
Tue 7th Jul '09 5:24am
Senior Member
 
Thanks, Andy!

Working fine.

Was able to upload from
http://www.speedtest.net/result/491748294.png
Reply
Reply