HighTechTalks DotNet Forums  

Validating a valid URL

Dotnet Scripting microsoft.public.dotnet.scripting


Discuss Validating a valid URL in the Dotnet Scripting forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Shabam
 
Posts: n/a

Default Validating a valid URL - 09-29-2004 , 07:38 AM






Is there a function that validates if a URL is valid or not? Basically I'm
trying to filter out bogus input, and things like cross site scripting
attacks.

Example:
<img src="javascript:alert(document.cookie)">

Doing it by regex seems way too complicated and there could be holes in the
logic if something is missed.



Reply With Quote
  #2  
Old   
Cor Ligthert
 
Posts: n/a

Default Re: Validating a valid URL - 09-29-2004 , 10:38 AM






Shabam,

Your question is not new in dotnet Newsgroups, I did a search on Google
here are some, sorry using regex.

http://tinyurl.com/69yyr

When that does not fit, I would ask it as well crossposted as you already
did in the newsgroups.
Microsoft.public.dotnet.languages.vb (or csharp) according what you use
and
Microsoft.public.dotnet.framework.aspnet

I hope this helps?

Cor

"Shabam" <blislecp (AT) hotmail (DOT) com> > Is there a function that validates if a
URL is valid or not? Basically I'm
Quote:
trying to filter out bogus input, and things like cross site scripting
attacks.

Example:
img src="javascript:alert(document.cookie)"

Doing it by regex seems way too complicated and there could be holes in
the
logic if something is missed.





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.