added backlight and fixed outbound
This commit is contained in:
@@ -275,6 +275,13 @@ def api_set_settings():
|
||||
if not isinstance(val, str) or not val.strip():
|
||||
abort(400, "password required")
|
||||
val = val.strip()
|
||||
if k == "webPort":
|
||||
try:
|
||||
val = int(val)
|
||||
except (TypeError, ValueError):
|
||||
abort(400, "invalid web port")
|
||||
if val < 1024 or val > 65535:
|
||||
abort(400, "web port must be 1024–65535")
|
||||
st[k] = val
|
||||
cfg["settings"] = st
|
||||
save_config(cfg)
|
||||
|
||||
Reference in New Issue
Block a user