Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 06-18-2010, 01:45 AM   #1
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?

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

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
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?

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

Rep: Reputation: 34
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


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 05:21 AM
Assigning large numbers of IPv6 addresses jack_sprat Linux - Networking 0 10-02-2007 10:04 AM
Does RH Cluster Service 3 supports IPv6 addresses visra Linux - Enterprise 0 06-25-2007 07:22 AM
LXer: Understand IPv6 Addresses LXer Syndicated Linux News 0 09-27-2006 04:33 PM
Detecting IPv6 addresses of interfaces obashir Programming 4 11-13-2002 07:25 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:55 PM.

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