LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 06-18-2010, 02:45 AM   #1
ashok.g
Member
 
Registered: Dec 2009
Location: Hyderabad,India
Distribution: RHEl AS 4
Posts: 215

Rep: Reputation: 32
Validate IPv6 addresses


Hi folks,
How can I validate an IPv6 address through javascript before using the IPv6 value in my cgi script?

Thanks,
 
Old 06-18-2010, 01:51 PM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by ashok.g View Post
Hi folks,
How can I validate an IPv6 address through javascript before using the IPv6 value in my cgi script?

Thanks,
Use the appropriate regular expression - for example.
 
Old 06-19-2010, 05:49 PM   #3
geek745
Member
 
Registered: Jul 2004
Location: Boston, MA
Distribution: Slackware; Ubuntu; Slax
Posts: 172
Blog Entries: 2

Rep: Reputation: 33
If you are really wary of hackers, do your validation server-side in cgi anyway - you can do the javascript client-side validation, but someone could download all the files of the page used to call the cgi and poison your server code that way. You can give friendly "Invalid IPv6 address" or something more intelligent in javascript and have a final regex check in the cgi that returns "Don't hack me, bro." if it's still wrong
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
discover all hosts in ipv6 subnet and their addresses ineya Linux - Networking 5 12-13-2008 06:21 AM
Assigning large numbers of IPv6 addresses jack_sprat Linux - Networking 0 10-02-2007 11:04 AM
Does RH Cluster Service 3 supports IPv6 addresses visra Linux - Enterprise 0 06-25-2007 08:22 AM
LXer: Understand IPv6 Addresses LXer Syndicated Linux News 0 09-27-2006 05:33 PM
Detecting IPv6 addresses of interfaces obashir Programming 4 11-13-2002 08:25 PM


All times are GMT -5. The time now is 04:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration