LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 01: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, 12:51 PM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
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, 04:49 PM   #3
geek745
Member
 
Registered: Jul 2004
Location: Alton, IL
Distribution: Linux Mint; 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
 
  


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 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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

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
Open Source Consulting | Domain Registration