Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Commerce Server Userprofile management > Protecting agai...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 179 of 267
Post > Topic >>

Protecting against SQL Injection Attacks with CSOLEDB

by "Colin Bowern" <colin.bowern@[EMAIL PROTECTED] > Aug 23, 2005 at 12:39 PM

Having read Mike Howard's Writing Secure Code in the past I'm deeply 
concerned with security, especially when there is commerce involved.  I 
noticed that I am unable to use parameterized commands though with
CSOLEDB. 
Creating an OleDbCommand with the following CommandText:



SELECT [KeyInfo.UserId] FROM [UserObject] WHERE [KeyInfo.UserId] = ?



results in "The ICommandWithParameters interface is not sup****ted by the 
'Commerce.DSO' provider.  Command parameters are unsup****ted with the 
current provider.".



Are there any better approaches?  The only way I've managed to get a query

working is as follows:


dbCommand.CommandText = "SELECT [" + propertyName + "] FROM [" +
profileType 
+ "] WHERE [" + propertyName + "] = '" + propertyValue.Replace("'", "''")
+ 
"'";



But that, of course, could be easily be cir***vented as noted in Howard's 
book.  So I'm left looking to see if anyone else has found a more secure
way 
to interface with CSOLEDB?



Thanks,

Colin
 




 1 Posts in Topic:
Protecting against SQL Injection Attacks with CSOLEDB
"Colin Bowern"   2005-08-23 12:39:42 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 17:18:04 CST 2008.