Browse Source

Restrict setting open_browser values in config file

shortcutme 4 years ago
parent
commit
bf771eda5f
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/Ui/UiWebsocket.py

+ 5 - 0
src/Ui/UiWebsocket.py

@@ -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]