From 31ee864f04a3eb536bcf9606d153943fd9aa338c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 30 Oct 2020 11:10:30 +0100 Subject: [PATCH] Disallow printer names that start with a dot Fixes #8639. --- cura/Settings/MachineNameValidator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Settings/MachineNameValidator.py b/cura/Settings/MachineNameValidator.py index 8ab8907355..c3ca4ed369 100644 --- a/cura/Settings/MachineNameValidator.py +++ b/cura/Settings/MachineNameValidator.py @@ -31,7 +31,7 @@ class MachineNameValidator(QObject): # special character, and that up to [machine_name_max_length / 12] times. maximum_special_characters = int(machine_name_max_length / 12) unescaped = r"[a-zA-Z0-9_\-\.\/]" - self.machine_name_regex = r"^((" + unescaped + "){0,12}|.){0," + str(maximum_special_characters) + r"}$" + self.machine_name_regex = r"^[^\.]((" + unescaped + "){0,12}|.){0," + str(maximum_special_characters) + r"}$" validationChanged = pyqtSignal()