mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-19 07:48:10 +00:00
Improvement to validate HTTP authentication config. Ref #1662
This commit is contained in:
@ -229,6 +229,13 @@ def run():
|
||||
if server_config.getboolean("local"):
|
||||
log.warning("Local mode is enabled. Beware, clients will have full control on your filesystem")
|
||||
|
||||
if server_config.getboolean("auth"):
|
||||
user = server_config.get("user", "").strip()
|
||||
if not user:
|
||||
log.critical("HTTP authentication is enabled but no username is configured")
|
||||
return
|
||||
log.info("HTTP authentication is enabled with username '{}'".format(user))
|
||||
|
||||
# we only support Python 3 version >= 3.5
|
||||
if sys.version_info < (3, 5, 3):
|
||||
raise SystemExit("Python 3.5.3 or higher is required")
|
||||
|
Reference in New Issue
Block a user