Recent Topics

[2.4.1] No check for existence of file in htsrv/getfile.php

Started by on Apr 01, 2008 – Contents updated: Apr 01, 2008

Apr 01, 2008 18:18    

Hello,

I've found a little bug in b2evolution 2.4.1. In htsrv/getfile.php the existence of the requested file isn't checked, so that PHP shows a few errors if a not existing file is requested. A fix would be to check if $File->exists() returns true and show an error message if not.

Below line 60 simply add:

if (!$File->exists())
{
    header('HTTP/1.1 404 Not Found');
    die('<h1>Not found</h1>The requested file could not be retrieved.');
}

Tested and works for me.

Tblue

Apr 09, 2008 01:52

OK, we'll work on that. thx for reporting.


Form is loading...

Community software – This forum is powered by b2evolution CMS, a complete engine for your website.