Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Bugtraq
[Top] [All Lists]

Re: Cross site scripting & fullpath disclosure

Subject: Re: Cross site scripting & fullpath disclosure
Date: 27 Dec 2006 17:58:56 -0000
The solution to this is to insert the following code in sp_helper_functions.php 
at line 10:

if (!file_exists(stripslashes($input_dir)))
        return array();

This should come immediatly before the original line 10 which is:               

$dh  = opendir(stripslashes($input_dir));       

This is alters function getDirList which should now read as follows:

//THIS FUNCTION WILL RETURN A SORTED ARRAY OF ALL FILES AND FOLDERS IN THE 
CURRENT DIRECTORY
function getDirList($input_dir="") 
{
        global $dir;
        if($input_dir == '')
                $input_dir = $dir;
        //echo "--" . stripslashes($input_dir) , "--";
        
        // the following is a fix for 
http://nvd.nist.gov/nvd.cfm?cvename=CVE-2006-6273
        // by James Brown 10:53 AM 12/27/2006
        if (!file_exists(stripslashes($input_dir)))
                return array();
                
        $dh  = opendir(stripslashes($input_dir));       
        while (false !== ($filename = readdir($dh))) 
        {
                $files[] = $filename;
        }
        @sort($files);
        return $files;
}

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Cross site scripting & fullpath disclosure, james . brown <=