Restrict setting open_browser values in config file
This commit is contained in:
parent
a9b5561c49
commit
bf771eda5f
1 changed files with 5 additions and 0 deletions
|
@ -1120,6 +1120,11 @@ class UiWebsocket(object):
|
|||
self.response(to, {"error": "Forbidden you cannot set this config key"})
|
||||
return
|
||||
|
||||
if key == "open_browser":
|
||||
if value not in ["default_browser", "False"]:
|
||||
self.response(to, {"error": "Forbidden: Invalid value"})
|
||||
return
|
||||
|
||||
# Remove empty lines from lists
|
||||
if type(value) is list:
|
||||
value = [line for line in value if line]
|
||||
|
|
Loading…
Reference in a new issue