1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-24 17:28:08 +00:00

Fix crash if you pass an invalid hostname

Fix #198
This commit is contained in:
Julien Duponchelle 2015-05-27 17:34:01 +02:00
parent a86bac4214
commit 74ee73581a

View File

@ -186,7 +186,13 @@ def main():
Project.clean_project_directory() Project.clean_project_directory()
CrashReport.instance() CrashReport.instance()
host = server_config["host"]
try:
host = server_config["host"].encode("idna").decode()
except UnicodeError:
log.critical("Invalid hostname %s", server_config["host"])
return
port = int(server_config["port"]) port = int(server_config["port"])
server = Server.instance(host, port) server = Server.instance(host, port)
try: try: