Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Restrict protocol of "server_url" values to HTTP(S)
- Loading branch information
Showing
with
5 additions
and
0 deletions.
-
+5
−0
server.py
|
@@ -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", |
|
|