Re: Is it possible to sql inject this code?
- From: "Dan Guzman" <guzmanda@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 20 Jan 2006 19:26:41 -0600
To add to Uri's response, injection vulnerability often exists in
application code. Consider the case where the client app builds a SQL
statement string using values supplied by the user:
strSQL = "EXEC Sp_Login '" & textBoxUserName * "', '" & textBoxPassword &
"'"
You can use parameterized queries to help prevent injection.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Dixon" <vijaydixon@xxxxxxxxx> wrote in message
news:1137662421.965015.301250@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Is it possible to sql inject this code?
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
> ALTER PROCEDURE Sp_Login
> (@username as nvarchar(100),@password as nvarchar(100))
> AS
> select count (*)from Tablename where Username=@username and
> Password=@password
>
>
> RETURN
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
.
- Follow-Ups:
- Re: Is it possible to sql inject this code?
- From: Dan Guzman
- Re: Is it possible to sql inject this code?
- References:
- Is it possible to sql inject this code?
- From: Dixon
- Is it possible to sql inject this code?
- Prev by Date: Re: Cached Credentials & Database Diagrams
- Next by Date: Re: Is it possible to sql inject this code?
- Previous by thread: Re: Is it possible to sql inject this code?
- Next by thread: Re: Is it possible to sql inject this code?
- Index(es):
Relevant Pages
|
|