Re: Is it possible to sql inject this code?
- From: "Dan Guzman" <guzmanda@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 20 Jan 2006 19:39:44 -0600
I forgot to mention that you shouldn't prefix user stored procedures with
'sp_'. That prefix is for system stored procedures.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Dan Guzman" <guzmanda@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:es789miHGHA.1676@xxxxxxxxxxxxxxxxxxxxxxx
> 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: Dixon
- Re: Is it possible to sql inject this code?
- References:
- Is it possible to sql inject this code?
- From: Dixon
- Re: Is it possible to sql inject this code?
- From: Dan Guzman
- Is it possible to sql inject this code?
- Prev by Date: Re: Is it possible to sql inject this code?
- Next by Date: How to add the web server logon
- 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
|
|