dbTalk Databases Forums  

Need help preventing injection - newbie

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Need help preventing injection - newbie in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AlexCook
 
Posts: n/a

Default Need help preventing injection - newbie - 11-18-2007 , 10:46 PM






Hi

I am an oracle newbie. Also an intermediate in mysql.

In the past I've used a method in PHP to prevent injection:

function _escape ( $sql )
{
$args = func_get_args();
foreach($args as $key => $val)
{
$args [ $key ] = mysql_real_escape_string ( $val );
}
$args [ 0 ] = $sql;
return call_user_func_array ( 'sprintf', $args);
}

Wondering if anyone knows the oracle equivalent in PHP for preventing
sql injection?

Thanks in advance

Reply With Quote
  #2  
Old   
DA Morgan
 
Posts: n/a

Default Re: Need help preventing injection - newbie - 11-19-2007 , 12:59 AM






AlexCook wrote:
Quote:
Hi

I am an oracle newbie. Also an intermediate in mysql.

In the past I've used a method in PHP to prevent injection:

function _escape ( $sql )
{
$args = func_get_args();
foreach($args as $key => $val)
{
$args [ $key ] = mysql_real_escape_string ( $val );
}
$args [ 0 ] = $sql;
return call_user_func_array ( 'sprintf', $args);
}

Wondering if anyone knows the oracle equivalent in PHP for preventing
sql injection?

Thanks in advance
In Oracle user bind variables and the DBMS_ASSERT built-in package.
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.