473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Dangerous inputs in asp.net web forms

Hi !

I have important doubts about how to handle the security in asp.net
vb.net web forms. Somebody can help me?

1. If you have setting ‘validateRequest=true’ in .net framework1.1,
What can do you do to improve the security? Because although you have
validations on server side you can enter dangerous characters in a
text field, with the exception of telephone numbers or similar.

2. And in the case you don’ t allow enter dangerous characters like
‘<’ and ‘>’ through the server side validations, if you have
the .net framework1.1 with ‘validateRequest=true’ it will show the
error confusing page to the user before the server validations do the
work.

3. Then if you decide set the ‘validateRequest’ to false, is a very
dangerous practice because you can have a hole in somewhere in which
the malicious user can do something.

4. On the other hand, I don’ t understand the real utility of the
‘Server.HtmlEncode’ because since you have ‘validateRequest=true’
it’s impossible to enter ‘<’ and ‘>’ characters if somebody
need them, so What utility has?
So, what can I do? I’ m very confusing with these 4 aspects.

Thank you in advance,
Cesar
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 18 '05 #1
4 1280
Where do I put the: validateRequest=false ? I am having this problem with
a DataGrid.

Thanks in advance for all you help,

Jack

"Chris Jackson" <chrisjATmvpsDOTorgNOSPAM> wrote in message
news:Oh**************@TK2MSFTNGP09.phx.gbl...
1. If you have setting 'validateRequest=true' in .net framework1.1,
What can do you do to improve the security? Because although you have
validations on server side you can enter dangerous characters in a
text field, with the exception of telephone numbers or similar.
You can use individual validator controls and validate each text box

object according to the rules it should abide by. For example, you could put a
regular expression validator on a control that is meant to hold a phone
number to ensure that only a valid phone number is entered here.
2. And in the case you don' t allow enter dangerous characters like
'<' and '>' through the server side validations, if you have
the .net framework1.1 with 'validateRequest=true' it will show the
error confusing page to the user before the server validations do the
work.
You could run your individual control validators on the client side, which
basically injects a bit of javascript that will pop up a dialog box

alerting the user that they have entered something invalid before it ever gets to the server.
3. Then if you decide set the 'validateRequest' to false, is a very
dangerous practice because you can have a hole in somewhere in which
the malicious user can do something.
Yes, but sometimes it is necessary, and you should supplant its
functionality with thorough validation of your controls.
4. On the other hand, I don' t understand the real utility of the
'Server.HtmlEncode' because since you have 'validateRequest=true'
it's impossible to enter '<' and '>' characters if somebody
need them, so What utility has?


&lt; and &gt; are not the only substitutions that HtmlEncode makes, and it

s purpose is not only for validation. For example, if you want to put a string as your query string, you would want to HtmlEncode it first. If you wanted
to output a bit of HTML code that you want shown but not executed, you would want to HtmlEncode it first. And so forth.
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

Nov 18 '05 #2
Sorry...I got it.

Thanks!!!
"jack" <ja**@mrolinux.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Where do I put the: validateRequest=false ? I am having this problem with a DataGrid.

Thanks in advance for all you help,

Jack

"Chris Jackson" <chrisjATmvpsDOTorgNOSPAM> wrote in message
news:Oh**************@TK2MSFTNGP09.phx.gbl...
1. If you have setting 'validateRequest=true' in .net framework1.1,
What can do you do to improve the security? Because although you have
validations on server side you can enter dangerous characters in a
text field, with the exception of telephone numbers or similar.
You can use individual validator controls and validate each text box

object
according to the rules it should abide by. For example, you could put a
regular expression validator on a control that is meant to hold a phone
number to ensure that only a valid phone number is entered here.
2. And in the case you don' t allow enter dangerous characters like
'<' and '>' through the server side validations, if you have
the .net framework1.1 with 'validateRequest=true' it will show the
error confusing page to the user before the server validations do the
work.


You could run your individual control validators on the client side, which basically injects a bit of javascript that will pop up a dialog box

alerting
the user that they have entered something invalid before it ever gets to

the
server.
3. Then if you decide set the 'validateRequest' to false, is a very
dangerous practice because you can have a hole in somewhere in which
the malicious user can do something.


Yes, but sometimes it is necessary, and you should supplant its
functionality with thorough validation of your controls.
4. On the other hand, I don' t understand the real utility of the
'Server.HtmlEncode' because since you have 'validateRequest=true'
it's impossible to enter '<' and '>' characters if somebody
need them, so What utility has?


&lt; and &gt; are not the only substitutions that HtmlEncode makes, and it s
purpose is not only for validation. For example, if you want to put a

string
as your query string, you would want to HtmlEncode it first. If you

wanted to output a bit of HTML code that you want shown but not executed, you

would
want to HtmlEncode it first. And so forth.
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--


Nov 18 '05 #3
Where do I put the: validateRequest=false ? I am having this problem with
a DataGrid.

Thanks in advance for all you help,

Jack

"Chris Jackson" <chrisjATmvpsDOTorgNOSPAM> wrote in message
news:Oh**************@TK2MSFTNGP09.phx.gbl...
1. If you have setting 'validateRequest=true' in .net framework1.1,
What can do you do to improve the security? Because although you have
validations on server side you can enter dangerous characters in a
text field, with the exception of telephone numbers or similar.
You can use individual validator controls and validate each text box

object according to the rules it should abide by. For example, you could put a
regular expression validator on a control that is meant to hold a phone
number to ensure that only a valid phone number is entered here.
2. And in the case you don' t allow enter dangerous characters like
'<' and '>' through the server side validations, if you have
the .net framework1.1 with 'validateRequest=true' it will show the
error confusing page to the user before the server validations do the
work.
You could run your individual control validators on the client side, which
basically injects a bit of javascript that will pop up a dialog box

alerting the user that they have entered something invalid before it ever gets to the server.
3. Then if you decide set the 'validateRequest' to false, is a very
dangerous practice because you can have a hole in somewhere in which
the malicious user can do something.
Yes, but sometimes it is necessary, and you should supplant its
functionality with thorough validation of your controls.
4. On the other hand, I don' t understand the real utility of the
'Server.HtmlEncode' because since you have 'validateRequest=true'
it's impossible to enter '<' and '>' characters if somebody
need them, so What utility has?


&lt; and &gt; are not the only substitutions that HtmlEncode makes, and it

s purpose is not only for validation. For example, if you want to put a string as your query string, you would want to HtmlEncode it first. If you wanted
to output a bit of HTML code that you want shown but not executed, you would want to HtmlEncode it first. And so forth.
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

Nov 18 '05 #4
Sorry...I got it.

Thanks!!!
"jack" <ja**@mrolinux.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Where do I put the: validateRequest=false ? I am having this problem with a DataGrid.

Thanks in advance for all you help,

Jack

"Chris Jackson" <chrisjATmvpsDOTorgNOSPAM> wrote in message
news:Oh**************@TK2MSFTNGP09.phx.gbl...
1. If you have setting 'validateRequest=true' in .net framework1.1,
What can do you do to improve the security? Because although you have
validations on server side you can enter dangerous characters in a
text field, with the exception of telephone numbers or similar.
You can use individual validator controls and validate each text box

object
according to the rules it should abide by. For example, you could put a
regular expression validator on a control that is meant to hold a phone
number to ensure that only a valid phone number is entered here.
2. And in the case you don' t allow enter dangerous characters like
'<' and '>' through the server side validations, if you have
the .net framework1.1 with 'validateRequest=true' it will show the
error confusing page to the user before the server validations do the
work.


You could run your individual control validators on the client side, which basically injects a bit of javascript that will pop up a dialog box

alerting
the user that they have entered something invalid before it ever gets to

the
server.
3. Then if you decide set the 'validateRequest' to false, is a very
dangerous practice because you can have a hole in somewhere in which
the malicious user can do something.


Yes, but sometimes it is necessary, and you should supplant its
functionality with thorough validation of your controls.
4. On the other hand, I don' t understand the real utility of the
'Server.HtmlEncode' because since you have 'validateRequest=true'
it's impossible to enter '<' and '>' characters if somebody
need them, so What utility has?


&lt; and &gt; are not the only substitutions that HtmlEncode makes, and it s
purpose is not only for validation. For example, if you want to put a

string
as your query string, you would want to HtmlEncode it first. If you

wanted to output a bit of HTML code that you want shown but not executed, you

would
want to HtmlEncode it first. And so forth.
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--


Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Sven Neuberg | last post by:
Hi, I have been handed the task of updating and maintaining a web application, written in ASP and Javascript, that takes complex user inputs in HTML form and submits them to server-side ASP...
6
by: STech | last post by:
If data you post back contains the following string on<<any sequence of characters>>= example: on2q3asdf= The page will throw the following exception: A potentially dangerous Request.Form...
302
by: Lee | last post by:
Hi Whenever I use the gets() function, the gnu c compiler gives a warning that it is dangerous to use gets(). Is this due to the possibility of array overflow? Is it correct that the program...
233
by: Julian | last post by:
'evening. I'm not new to C and have been programming in it since I was 8 but here's a strange problem I've never seen before. When I compile a program from our C course with a windows compiler...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.