From 7b0df4a5747f11acf1feb5a96d2f4341cf5ab876 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sat, 26 Jan 2019 16:17:38 +0000 Subject: [PATCH] fhem.pl: check for uniqueID manipulation (Forum #96172) git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@18423 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fhem.pl b/fhem.pl index 8e1d43fd1..adb70a594 100755 --- a/fhem.pl +++ b/fhem.pl @@ -5354,7 +5354,10 @@ sub getUniqueId() { my ($err, $uniqueID) = getKeyValue("uniqueID"); - return $uniqueID if(defined($uniqueID)); + if(defined($uniqueID)) { + $uniqueID =~ s/[^0-9a-f]//g; + return $uniqueID if($uniqueID && length($uniqueID) == 32); + } $uniqueID = createUniqueId(); setKeyValue("uniqueID", $uniqueID); return $uniqueID;