1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-25 00:08:11 +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()
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"])
server = Server.instance(host, port)
try: