We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb0cfad commit a435038Copy full SHA for a435038
1 file changed
protovalidate/internal/extra_func.py
@@ -225,14 +225,13 @@ def _is_hostname(val: str) -> bool:
225
def _is_port(val: str) -> bool:
226
if len(val) == 0:
227
return False
228
-
+ if len(val) > 1 and val[0] == "0":
229
+ return False
230
for c in val:
231
if c < "0" or c > "9":
232
233
try:
234
return int(val) <= 65535
235
236
except ValueError:
237
# Error converting to number
238
0 commit comments