mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
fhem.pl: Remove set|get|attr ? from Authorization check (Forum: #85083)
git-svn-id: https://svn.fhem.de/fhem/trunk@16312 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
87477e33cb
commit
0ca61094d3
11
fhem/fhem.pl
11
fhem/fhem.pl
@ -1161,7 +1161,10 @@ AnalyzeCommand($$;$)
|
||||
|
||||
return "Unknown command $fn, try help." if(!$cmds{$fn} || !$cmds{$fn}{Fn});
|
||||
|
||||
return "Forbidden command $fn." if($cl && !Authorized($cl,"cmd",$fn));
|
||||
return "Forbidden command $fn."
|
||||
if($cl &&
|
||||
$cmd !~ m/^(set|get|attr)\s+[^ ]+\s+\?$/ &&
|
||||
!Authorized($cl, "cmd", $fn));
|
||||
|
||||
if($cl && $cmds{$fn}{ClientFilter} &&
|
||||
$cl->{TYPE} !~ m/$cmds{$fn}{ClientFilter}/) {
|
||||
@ -1785,7 +1788,7 @@ CommandSet($$)
|
||||
return "Usage: set <name> <type-dependent-options>\n$namedef" if(int(@a)<1);
|
||||
|
||||
my @rets;
|
||||
foreach my $sdev (devspec2array($a[0], $cl)) {
|
||||
foreach my $sdev (devspec2array($a[0], $a[1] && $a[1] eq "?" ? undef : $cl)) {
|
||||
|
||||
$a[0] = $sdev;
|
||||
$defs{$sdev}->{CL} = $cl if($defs{$sdev});
|
||||
@ -1809,7 +1812,7 @@ CommandGet($$)
|
||||
|
||||
|
||||
my @rets;
|
||||
foreach my $sdev (devspec2array($a[0], $cl)) {
|
||||
foreach my $sdev (devspec2array($a[0], $a[1] && $a[1] eq "?" ? undef : $cl)) {
|
||||
if(!defined($defs{$sdev})) {
|
||||
push @rets, "Please define $sdev first";
|
||||
next;
|
||||
@ -2683,7 +2686,7 @@ CommandAttr($$)
|
||||
if(@a && @a < 2);
|
||||
|
||||
my @rets;
|
||||
foreach my $sdev (devspec2array($a[0],$cl)) {
|
||||
foreach my $sdev (devspec2array($a[0], $a[1] && $a[1] eq "?" ? undef : $cl)) {
|
||||
|
||||
my $hash = $defs{$sdev};
|
||||
my $attrName = $a[1];
|
||||
|
Loading…
x
Reference in New Issue
Block a user