Форум · Полнота восстановления · Каталог вариантов

L2CP Reborn. — testdude — #74875

Сообщение в форуме

Снимок 2008-03-19 02:04 UTC

Имя в снимке: testdude · Источник Wayback

lawl w/e i might aswell be the person to say this

you didnt fix the sql injection

Code:

[code]function checkcookie($where, $cookieuser, $cookiepass, $dbname, $sqladdress, $sqluser, $sqlpass) {
	$cookieuser=antiinjection($cookieuser);
	$cookiepass=antiinjection($cookiepass);
	connectdb($dbname,$sqladdress, $sqluser, $sqlpass);
	if($where==0) {
		$result = mssql_query(sprintf(SELECT_USER_PASS, $cookieuser));
		$rows=mssql_num_rows($result);
		if ($rows>0) {
			$rows=mssql_fetch_assoc($result); 
			extract($rows);
			$password = '0x' . bin2hex($password);
			if(md5($password)==$cookiepass) {
				quickrefresh('home.php');
			} else {
				resetcookies();
			}
		} else {
		resetcookies();
		}
	} elseif($where==1) {
		$result = mssql_query(sprintf(SELECT_USER_PASS, $cookieuser));
		$rows=mssql_num_rows($result);
		if ($rows>0) {
			$rows=mssql_fetch_assoc($result); 
			extract($rows);
			$password = '0x' . bin2hex($password);
			if(md5($password)!=$cookiepass) {
				notloggedin();
			}
		} else {
			notloggedin();
		}
	}
}[/code]

that fixes the sql injection kthnx

<3 from l2e the practically ONLY server to have secured l2cp >.>