Re: Form login
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Sat, 24 Nov 2007 16:50:24 -0500
Brynn wrote:
Aren't you only leaving yourself open for sql injection if you don't
make sure that certain characters aren't in the string before you
allow them into your sql string. Like making sure that they are number
and letters only first with scripts.
No. That's a start, but clever hackers can find ways to defeat
security-by-validation-only. Go back and look at the links I posted. They
show a couple ways, but there are more.
The only way to be sure of preventing SQL Injection is to not use
concatenation to build query strings. Use parameters. Not only are they more
secure, they are also easier to use (you don't have to worry about
delimiters, for starters). Definitely a win-win solution, in my mind.
Don't neglect server-side validation of user inputs just because you are
using parameters. You want to be able to detect hack attempts at an early
stage...
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
.
- Follow-Ups:
- Re: Form login
- From: Brynn
- Re: Form login
- References:
- Form login
- From: Paulo
- Re: Form login
- From: Bob Barrows [MVP]
- Re: Form login
- From: Brynn
- Form login
- Prev by Date: Re: INSERT INTO doesn't wait for table creation...
- Next by Date: Save from db to file
- Previous by thread: Re: Form login
- Next by thread: Re: Form login
- Index(es):
Relevant Pages
|