Open
Bug 746104
Opened 13 years ago
Updated 2 years ago
Expose a better util (like PR_StringToNetAddr) to js to recognize valid IP addresses
Categories
(Core :: Networking, defect, P5)
Core
Networking
Tracking
()
NEW
People
(Reporter: mak, Unassigned)
Details
(Whiteboard: [necko-would-take])
A possible method to use today is
try {
Services.eTLD.getBaseDomainFromHost(aHost);
} catch (e if e.result == Cr.NS_ERROR_HOST_IS_IP_ADDRESS) {
// it's an IP address.
}
Or one may cook up a regex for ipv4 and v6. This is not much elegant, having something exposed to js like PR_StringToNetAddr could be better.
Updated•9 years ago
|
Whiteboard: [necko-would-take]
Comment 1•7 years ago
|
||
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P5
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•