From 51fd460b594cda3b2bd958a1b4d70c641e711e30 Mon Sep 17 00:00:00 2001 From: Arksine Date: Tue, 9 Mar 2021 16:52:03 -0500 Subject: [PATCH] database: respect case for "namespace" and "key" arguments in request handler Signed-off-by: Eric Callahan --- moonraker/plugins/database.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/moonraker/plugins/database.py b/moonraker/plugins/database.py index bf4916b..bd3ca43 100644 --- a/moonraker/plugins/database.py +++ b/moonraker/plugins/database.py @@ -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":