Skip to content

Commit

Permalink
fix: ip validation in diag rpc helper (#3580)
Browse files Browse the repository at this point in the history
  • Loading branch information
vagetablechicken authored Nov 15, 2023
1 parent 5d0d638 commit b1435d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/openmldb_tool/diagnostic_tool/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
)

def validate_ip_address(ip_string):
return not any(c.isalpha() for c in ip_string)
# localhost:xxxx is valid ip too, ip must have at least one ":"
return ip_string.find(":") != -1


host2service = {
Expand Down

0 comments on commit b1435d2

Please sign in to comment.