From 4ec69191fd4fdbb122fc6480c219b53a08c70b5e Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sun, 9 Jul 2017 18:32:41 +0000 Subject: [PATCH] 96_allowed.pm: avoid crash when entering strange commands (Forum #74076) git-svn-id: https://svn.fhem.de/fhem/trunk@14681 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/96_allowed.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/96_allowed.pm b/fhem/FHEM/96_allowed.pm index d3270f45d..5ea3eb730 100755 --- a/fhem/FHEM/96_allowed.pm +++ b/fhem/FHEM/96_allowed.pm @@ -77,14 +77,15 @@ allowed_Authorize($$$$) if($type eq "cmd") { return 0 if(!$me->{allowedCommands}); # Return 0: allow stacking with other instances, see Forum#46380 - return ($me->{allowedCommands} =~ m/\b$arg\b/) ? 0 : 2; + return ($me->{allowedCommands} =~ m/\b\Q$arg\E\b/) ? 0 : 2; } if($type eq "devicename") { return 0 if(!$me->{allowedDevices}); - return ($me->{allowedDevices} =~ m/\b$arg\b/) ? 0 : 2; + return ($me->{allowedDevices} =~ m/\b\Q$arg\E\b/) ? 0 : 2; } + return 0; }