From 8a2de5f23e0ffdd2ca88b78d1a99217e5132256a Mon Sep 17 00:00:00 2001 From: Pedro Lamas Date: Fri, 31 Jan 2025 11:00:16 +0000 Subject: save_variables: Check lowercase variable names Signed-off-by: Pedro Lamas --- klippy/extras/save_variables.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'klippy/extras/save_variables.py') diff --git a/klippy/extras/save_variables.py b/klippy/extras/save_variables.py index 6cedcf46..2e405657 100644 --- a/klippy/extras/save_variables.py +++ b/klippy/extras/save_variables.py @@ -36,6 +36,8 @@ class SaveVariables: cmd_SAVE_VARIABLE_help = "Save arbitrary variables to disk" def cmd_SAVE_VARIABLE(self, gcmd): varname = gcmd.get('VARIABLE') + if (varname.lower() != varname): + raise gcmd.error("VARIABLE must not contain upper case") value = gcmd.get('VALUE') try: value = ast.literal_eval(value) -- cgit v1.2.3-70-g09d2