473,413 Members | 1,727 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,413 software developers and data experts.

User Input Validation

I have a form into which users will enter text. I want the user to be able to enter "some" HTML however I would like to prevent "bad" HTML. The "bad" HTML would be things like <SCRIPT>, <OBJECT>,
<APPLET>, etc. Does anyone know of a good server side validator that will catch this type of "bad" HTML input while allowing the acceptable input?
--Buddy
Nov 19 '05 #1
2 1129
Buddy Ackerman <bu**********@buddyackerman.com> wrote in
news:O6**************@TK2MSFTNGP09.phx.gbl:
I have a form into which users will enter text. I want the user
to be able to enter "some" HTML however I would like to prevent
"bad" HTML. The "bad" HTML would be things like <SCRIPT>,
<OBJECT>,
<APPLET>, etc. Does anyone know of a good server side validator
that will catch this type of "bad" HTML input while allowing the
acceptable input?


Buddy,

Allowing a small subset of HTML tags within user input is fairly easy to do:

http://msdn.microsoft.com/library/de...pplication.asp

or

http://tinyurl.com/3humm

--
Hope this helps.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/
Nov 19 '05 #2
"Visual Input Security" (http://www.peterblum.com/vise/home.aspx) includes
validators that protect against Cross Site Scripting attacks, like you
describe. It Its validators are much more powerful than what you've
described because hackers can avoid those four nasty tags and still cause
these attacks. It also handles attacks on your database through SQL
Injection.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Buddy Ackerman" <bu**********@buddyackerman.com> wrote in message
news:O6**************@TK2MSFTNGP09.phx.gbl...
I have a form into which users will enter text. I want the user to be able
to enter "some" HTML however I would like to prevent "bad" HTML. The "bad"
HTML would be things like <SCRIPT>, <OBJECT>, <APPLET>, etc. Does anyone
know of a good server side validator that will catch this type of "bad"
HTML input while allowing the acceptable input?
--Buddy

Nov 19 '05 #3

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

Similar topics

3
by: mo | last post by:
The code I've pasted below is taken directly from Microsoft's site at http://support.microsoft.com/default.aspx?scid=kb;EN-US;308157 As far as I can tell the error is raised on this line: conn...
2
by: buran | last post by:
Dear ASP.NET Programmers, I have a web user control (a search menu) which has 2 validation controls (one for input and another for the search criterion). I am including this search user control...
1
by: betterdie | last post by:
Hi all; I code Perl for CGI, I using regular expression to check the validation of user input, because the form is small and it run only from my own computer, anyways if many people using my...
3
by: mo | last post by:
The code I've pasted below is taken directly from Microsoft's site at http://support.microsoft.com/default.aspx?scid=kb;EN-US;308157 As far as I can tell the error is raised on this line: conn...
4
by: joesin | last post by:
I recently found a vulnerability on my website that allowed sql injection. I have been trying to write some code that would clean user data but have been running into problems. The validation still...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.