Comments are available to members only. Sign up or Log in to view these comments.
Main Topics
Browse All Topicsgdemaria and myself have had an ongoing difference of opinion on sql injection vuln...
this is a huge question and I'd like to get feedback from many POV's
I believe cfquerparam is the only way to go, gd believes "placing a string in single quotes will help that because the injection will simply get saved into the database (if it fits).. "http://www.experts-exchan
(for the benefit of the mssql and mysql folks, cfqueryparam "Verifies the data type of a query parameter and, for DBMSs that support bind variables, enables ColdFusion to use bind variables in the SQL statement. " It basically forces the db to take the input as typed and prevents the reading of multiple sql commands.
It's my (perhaps flawed) understanding that single quotes do not protect you
(http://www.unixwiz.net/te
since if i do this as the example shows...
select * from mytable where somename= '#form.name#'
and pass this to the query
x'; DROP TABLE members; --
the query runs as
select * from mytable where somename= 'x'; DROP TABLE members; --'
isn't it true that by adding the x' you defeat the "value" of the quotes as the db will see that as end of first statement, start the next bit???
comments? ... happy to be proven wrong...
btw... gd... this is not meant to call you out, it's just that I want a good discussion about this as you've brought some doubts to my mind with what I thought was a "best practice"
x-posting this to mssql and mysql
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: Raynard7Posted on 2007-03-28 at 17:48:29ID: 18812976
Comments are available to members only. Sign up or Log in to view these comments.