From 02beb6751cb8dee218301cfaacbfe86965fa972f Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Tue, 1 Dec 2015 15:57:00 +0000 Subject: [PATCH] fhem.pl: better check for allowedCommands (Forum #38276) git-svn-id: https://svn.fhem.de/fhem/trunk@10067 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_telnet.pm | 9 +++++++-- fhem/fhem.pl | 34 ++++++++++++++++++---------------- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/fhem/FHEM/98_telnet.pm b/fhem/FHEM/98_telnet.pm index d7a6bb1ae..19db579a3 100644 --- a/fhem/FHEM/98_telnet.pm +++ b/fhem/FHEM/98_telnet.pm @@ -21,7 +21,7 @@ telnet_Initialize($) $hash->{UndefFn} = "telnet_Undef"; $hash->{AttrFn} = "telnet_Attr"; $hash->{NotifyFn}= "telnet_SecurityCheck"; - $hash->{AttrList} = "globalpassword password prompt ". + $hash->{AttrList} = "globalpassword password prompt allowedCommands ". "allowfrom SSL connectTimeout connectInterval ". "encoding:utf8,latin1 sslVersion"; $hash->{ActivateInformFn} = "telnet_ActivateInform"; @@ -269,7 +269,8 @@ telnet_Read($) undef($hash->{prevlines}); } $cmd = latin1ToUtf8($cmd) if( $hash->{encoding} eq "latin1" ); - $ret = AnalyzeCommandChain($hash, $cmd); + $ret = AnalyzeCommandChain($hash, $cmd, + AttrVal($sname,"allowedCommands",undef)); push @ret, $ret if(defined($ret)); } } else { @@ -420,6 +421,8 @@ telnet_ActivateInform($;$) Attributes: