database: respect case for "namespace" and "key" arguments in request handler

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2021-03-09 16:52:03 -05:00
parent 2e0d3f36b4
commit 51fd460b59
1 changed files with 1 additions and 3 deletions

View File

@ -269,7 +269,7 @@ class MoonrakerDatabase:
async def _handle_item_request(self, web_request):
action = web_request.get_action()
namespace = web_request.get_str("namespace").lower()
namespace = web_request.get_str("namespace")
if action != "GET":
if namespace in self.protected_namespaces:
raise self.server.error(
@ -283,8 +283,6 @@ class MoonrakerDatabase:
raise self.server.error(
"Value for argument 'key' is an invalid type: "
f"{type(key).__name__}")
if isinstance(key, str):
key = key.lower()
if action == "GET":
val = self.get_item(namespace, key)
elif action == "POST":