Quote:
Originally Posted by Brad.loo
|
This patched version didn't work for me unfortunately.
It gave my the "error in mysql near LIMIT 1" error.
Here's how to fix it... in last10.php change this....
Code:
// let's get connected
require("last10config.php");
require("$path/config.php");
$db=mysql_connect($servername,$dbusername,$dbpassword) or die("Can't open connection to MySQL");
mysql_select_db($dbname) or die("Can't select database");
// destroy some var's to prevent SQL injection (patch by Brad.loo, added 11/16/04)
unset($fsel, $ftitle, $wheresql, $ob, $obdir, $maxthreads);
$hfs = $fs+2;
to this....
Code:
// destroy some var's to prevent SQL injection (patch by Brad.loo, added 11/16/04)
unset($fsel, $ftitle, $wheresql, $ob, $obdir, $maxthreads);
// let's get connected
require("last10config.php");
require("$path/config.php");
$db=mysql_connect($servername,$dbusername,$dbpassword) or die("Can't open connection to MySQL");
mysql_select_db($dbname) or die("Can't select database");
$hfs = $fs+2;
should work now. The unset needs to come first else it destroys some of the required variables that were set up in last10config.php
Hope that hasn't defeated the point of the security fix, correct me if I am wrong please, Brad.loo or someone else!
Meza