diff --git a/lib/adodb/server.php b/lib/adodb/server.php index 9ea953c7262..bb9a4f3eb3a 100644 --- a/lib/adodb/server.php +++ b/lib/adodb/server.php @@ -1,98 +1,10 @@ Connect($host,$uid,$pwd,$database)) err($conn->ErrorNo(). $sep . $conn->ErrorMsg()); -$sql = undomq($_REQUEST['sql']); - -if (isset($_REQUEST['fetch'])) - $ADODB_FETCH_MODE = $_REQUEST['fetch']; - -if (isset($_REQUEST['nrows'])) { - $nrows = $_REQUEST['nrows']; - $offset = isset($_REQUEST['offset']) ? $_REQUEST['offset'] : -1; - $rs = $conn->SelectLimit($sql,$nrows,$offset); -} else - $rs = $conn->Execute($sql); -if ($rs){ - //$rs->timeToLive = 1; - echo _rs2serialize($rs,$conn,$sql); - $rs->Close(); -} else - err($conn->ErrorNo(). $sep .$conn->ErrorMsg()); +add_to_log(0, 'adodb', 'intrusion attempt', 'lib/adodb/server.php'); +trigger_error('SECURITY WARNING: intrusion attempt against lib/adodb/server.php from ' . getremoteaddr()); +error('SECURITY WARNING: logged intrusion attempt against lib/adodb/server.php'); ?> \ No newline at end of file diff --git a/lib/adodb/tests/tmssql.php b/lib/adodb/tests/tmssql.php index e20db41ed29..69bcb9ee7a7 100644 --- a/lib/adodb/tests/tmssql.php +++ b/lib/adodb/tests/tmssql.php @@ -1,65 +1,10 @@ mssql"; - $db = mssql_connect('JAGUAR\vsdotnet','adodb','natsoft') or die('No Connection'); - mssql_select_db('northwind',$db); - - $rs = mssql_query('select getdate() as date',$db); - $o = mssql_fetch_row($rs); - print_r($o); - mssql_free_result($rs); - - print "

Delete

"; flush(); - $rs2 = mssql_query('delete from adoxyz',$db); - $p = mssql_num_rows($rs2); - mssql_free_result($rs2); +require_once('../../../config.php'); +require_once('../../weblib.php'); -} +add_to_log(0, 'adodb', 'intrusion attempt', 'lib/adodb/tests/tmssql.php'); +trigger_error('SECURITY WARNING: intrusion attempt against lib/tests/tmssql.php from ' . getremoteaddr()); +error('SECURITY WARNING: logged intrusion attempt against lib/adodb/tests/tmssql.php'); -function tpear() -{ -include_once('DB.php'); - - print "

PEAR

"; - $username = 'adodb'; - $password = 'natsoft'; - $hostname = 'JAGUAR\vsdotnet'; - $databasename = 'northwind'; - - $dsn = "mssql://$username:$password@$hostname/$databasename"; - $conn = &DB::connect($dsn); - print "date=".$conn->GetOne('select getdate()')."
"; - @$conn->query('create table tester (id integer)'); - print "

Delete

"; flush(); - $rs = $conn->query('delete from tester'); - print "date=".$conn->GetOne('select getdate()')."
"; -} - -function tadodb() -{ -include_once('../adodb.inc.php'); - - print "

ADOdb

"; - $conn = NewADOConnection('mssql'); - $conn->Connect('JAGUAR\vsdotnet','adodb','natsoft','northwind'); -// $conn->debug=1; - print "date=".$conn->GetOne('select getdate()')."
"; - $conn->Execute('create table tester (id integer)'); - print "

Delete

"; flush(); - $rs = $conn->Execute('delete from tester'); - print "date=".$conn->GetOne('select getdate()')."
"; -} -?> -mssql -pear -adodb - \ No newline at end of file