Port validation should include 65535
Python's range test in inclusive to exclusive. Update 65535 to 65536. bug 956683 Change-Id: I1e22c045ab659c8a303e9fe3823236fe3e114feb
This commit is contained in:
1
AUTHORS
1
AUTHORS
@@ -14,6 +14,7 @@ Emma Steimann <emmasteimann@gmail.com>
|
||||
Ewan Mellor <ewan.mellor@citrix.com>
|
||||
Gabriel Hurley <gabriel@strikeawe.com>
|
||||
Ghe Rivero <ghe@debian.org>
|
||||
Greg Althaus <galthaus@austin.rr.com>
|
||||
Hengqing Hu <hudayou@hotmail.com>
|
||||
Ivan Kolodyazhny <e0ne@e0ne.info>
|
||||
Jake Dahn <jake@ansolabs.com>
|
||||
|
||||
@@ -31,7 +31,7 @@ validate_ipv4_cidr = validators.RegexValidator(ipv4_cidr_re)
|
||||
|
||||
|
||||
def validate_port_range(port):
|
||||
if port not in range(-1, 65535):
|
||||
if port not in range(-1, 65536):
|
||||
raise ValidationError("Not a valid port number")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user