mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 10:46:53 +00:00
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
This commit is contained in:
parent
01d8c218b6
commit
4ec69191fd
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user