Opened 13 years ago

Closed 12 years ago

#2360 closed defect (wontfix)

[dojox.validate] IpAddressTextbox - validation of first IP block bug

Reported by: guest Owned by: dante
Priority: high Milestone:
Component: Dojox Version: 0.4.1
Keywords: IpAddressTextbox Cc:
Blocked By: Blocking:

Description

Entering an integer larger than 255 (only) in an IpAddressTextbox? doesn't display an error msg.

For example - "123456" is not a valid IP address.

Only when you put the extra . (dot) it will validate the IP entered.

Change History (9)

comment:1 Changed 13 years ago by Adam Peller

Owner: changed from bill to Adam Peller

sounds familiar... I think this is a dup

comment:2 Changed 13 years ago by guest

Well, I did search before submitting this, but maybe I just didn't find it.

I also tried find the right RFC to see what's the true definition for a valid IP address is, because I think something like 254 is a valid IP because it is translated to 0.0.0.254 but I really am not sure. Thanks.

comment:3 Changed 13 years ago by Adam Peller

Cc: dylan added

It was difficult for me to find, and I had just seen it a couple of days earlier: #2347

It seems counterintuitive, but "ping 3514845390" works on my system (as if your octets were concatenated and converted to a decimal value) and I think the typical system calls work this way. Yet browsers (I tried Safari and Firefox on the Mac) do not understand http://3514845390/, even though I think it's *supposed* to work. There is a flag available to control this, so arguably that's good enough?

comment:4 Changed 13 years ago by guest

This is OT, but 317337327 is an IP in MIT's range (18.234.46.239). So I guess they're elitest.

comment:5 Changed 13 years ago by Adam Peller

Cc: dylan removed
Component: WidgetsValidate
Owner: changed from Adam Peller to dylan

I'm not sure what's happening to the underlying code in 0.9, but I don't think Dijit is using it anymore.

comment:6 Changed 12 years ago by Adam Peller

Owner: changed from dylan to dante

comment:7 Changed 12 years ago by bill

Component: ValidateDojox

comment:8 Changed 12 years ago by dante

Summary: IpAddressTextbox - validation of first IP block bug[dojox.validate] IpAddressTextbox - validation of first IP block bug

comment:9 Changed 12 years ago by dante

Resolution: wontfix
Status: newclosed

the decimal ip address "12345" converts to 0.0.48.57, which is (by spec) a valid IP (afai can tell from reading). if you wish to exclude the decimal checks, pass a flag disabled decimal being allowed, eg:

dojox.validate.isIpAddress("12345",{ allowDecimal:false });

Note: See TracTickets for help on using tickets.