Ask a Question related to ASP.NET Security, Design and Development.
-
vineetbatta #1
Cross-Site Scripting & sqlDataReader
I am using sqlDataReader for Showing data from the Data base.
But if the Data from sql is having tags like <script>alert()</script> then it shows an alert box while binding.
Is there any way of suppressing it this ..... ???? or is it a flaw?
regards
Vineet Batta
vineetbatta Guest
-
Prevent cross-scripting from the same domain
Hello, i have 2 swf files, example1.swf and example2.swf, both on the same domain. I load example2 in a Loader control (Flex) from example1. I... -
CFAdmin Cross Site Scripting
We recently signed up with ScanAlert, and they are reporting a XSS vulnerablilty in the CF Aministration. Path /CFIDE/administrator/enter.cfm ... -
Cross-domain scripting with Flash Player 6
I'm sure I'm missing something basic here, but for some reason I'm not able to access a text file on another domain when my movie is viewed with... -
Cross Site Scripting & Custom Error Pages
Hi, I have been investigating CSS vulnerabilites within my application and have a question. If I added malicious script tags to the Url these are... -
RegEx for XSS (Cross-Site Scripting)?
Trying to use the RegularExpressionValidator with the following expression which functions well when using code with the... -
Ken Schaefer #2
Re: Cross-Site Scripting & sqlDataReader
Use HTMLEncode() when outputting the data.
It replaces things like < with < etc. It is not a bug - you are using
reserved characters in your text, and you need to replace those reserved
characters with the appropriate HTML Entities that are defined in the HTML
specifications. HTMLEncode() does this for you.
Cheers
Ken
"vineetbatta" <anonymous@discussions.microsoft.com> wrote in message
news:B2FE8EF1-A473-458F-9659-96A059BED429@microsoft.com...
: I am using sqlDataReader for Showing data from the Data base.
: But if the Data from sql is having tags like <script>alert()</script> then
it shows an alert box while binding.
:
: Is there any way of suppressing it this ..... ???? or is it a flaw?
:
: regards
: Vineet Batta
:
Ken Schaefer Guest
-
avnrao #3
Re: Cross-Site Scripting & sqlDataReader
use HttpServerUtility.UrlEncode while binding.
Av.
"vineetbatta" <anonymous@discussions.microsoft.com> wrote in message
news:B2FE8EF1-A473-458F-9659-96A059BED429@microsoft.com...>I am using sqlDataReader for Showing data from the Data base.
> But if the Data from sql is having tags like <script>alert()</script> then
> it shows an alert box while binding.
>
> Is there any way of suppressing it this ..... ???? or is it a flaw?
>
> regards
> Vineet Batta
>
avnrao Guest
-
Ken Schaefer #4
Re: Cross-Site Scripting & sqlDataReader
You mean HTMLEncode()?
URLEncode() is for formatting text to be placed into a URL (eg as part of a
querystring)
Cheers
Ken
"avnrao" <avn@newsgroups.com> wrote in message
news:eI$54TyNEHA.1396@TK2MSFTNGP10.phx.gbl...
: use HttpServerUtility.UrlEncode while binding.
:
: Av.
: "vineetbatta" <anonymous@discussions.microsoft.com> wrote in message
: news:B2FE8EF1-A473-458F-9659-96A059BED429@microsoft.com...
: >I am using sqlDataReader for Showing data from the Data base.
: > But if the Data from sql is having tags like <script>alert()</script>
then
: > it shows an alert box while binding.
: >
: > Is there any way of suppressing it this ..... ???? or is it a flaw?
: >
: > regards
: > Vineet Batta
: >
:
:
Ken Schaefer Guest
-
avnrao #5
Re: Cross-Site Scripting & sqlDataReader
thats true. its HTMLEncode().
Av.
"Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
news:OfdW3eyNEHA.3492@TK2MSFTNGP10.phx.gbl...> You mean HTMLEncode()?
>
> URLEncode() is for formatting text to be placed into a URL (eg as part of
> a
> querystring)
>
> Cheers
> Ken
>
> "avnrao" <avn@newsgroups.com> wrote in message
> news:eI$54TyNEHA.1396@TK2MSFTNGP10.phx.gbl...
> : use HttpServerUtility.UrlEncode while binding.
> :
> : Av.
> : "vineetbatta" <anonymous@discussions.microsoft.com> wrote in message
> : news:B2FE8EF1-A473-458F-9659-96A059BED429@microsoft.com...
> : >I am using sqlDataReader for Showing data from the Data base.
> : > But if the Data from sql is having tags like <script>alert()</script>
> then
> : > it shows an alert box while binding.
> : >
> : > Is there any way of suppressing it this ..... ???? or is it a flaw?
> : >
> : > regards
> : > Vineet Batta
> : >
> :
> :
>
>
avnrao Guest



Reply With Quote

