Skip to content

Commit 0d93321

Browse files
committedNov 6, 2017
Restrict protocol of "server_url" values to HTTP(S)
1 parent da9f297 commit 0d93321

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

Diff for: ‎server.py

+5
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ def announce():
110110

111111
server["clients_top"] = max(server["clients"], old["clients_top"]) if old else server["clients"]
112112

113+
if "url" in server:
114+
url = server["url"]
115+
if not any(url.startswith(p) for p in ["http://", "https://", "//"]):
116+
del server["url"]
117+
113118
# Make sure that startup options are saved
114119
if action == "update":
115120
for field in ("dedicated", "rollback", "mapgen", "privs",

0 commit comments

Comments
 (0)
Please sign in to comment.