Restrict protocol of "server_url" values to HTTP(S)

This commit is contained in:
sfan5
2017-11-06 19:45:28 +01:00
parent da9f297346
commit 0d93321f6d

View File

@@ -110,6 +110,11 @@ def announce():
server["clients_top"] = max(server["clients"], old["clients_top"]) if old else server["clients"]
if "url" in server:
url = server["url"]
if not any(url.startswith(p) for p in ["http://", "https://", "//"]):
del server["url"]
# Make sure that startup options are saved
if action == "update":
for field in ("dedicated", "rollback", "mapgen", "privs",