mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 08:11:44 +00:00
Some security checks
git-svn-id: https://svn.fhem.de/fhem/trunk@2884 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
62a820ef1f
commit
cc55293207
@ -595,7 +595,7 @@ FW_digestCgi($)
|
|||||||
$arg =~ s,^.*?[?],,;
|
$arg =~ s,^.*?[?],,;
|
||||||
foreach my $pv (split("&", $arg)) {
|
foreach my $pv (split("&", $arg)) {
|
||||||
$pv =~ s/\+/ /g;
|
$pv =~ s/\+/ /g;
|
||||||
$pv =~ s/%(..)/chr(hex($1))/ge;
|
$pv =~ s/%([\dA-F][\dA-F])/chr(hex($1))/ige;
|
||||||
my ($p,$v) = split("=",$pv, 2);
|
my ($p,$v) = split("=",$pv, 2);
|
||||||
|
|
||||||
# Multiline: escape the NL for fhem
|
# Multiline: escape the NL for fhem
|
||||||
@ -643,7 +643,7 @@ FW_updateHashes()
|
|||||||
foreach my $d (sort keys %defs ) {
|
foreach my $d (sort keys %defs ) {
|
||||||
next if(IsIgnored($d));
|
next if(IsIgnored($d));
|
||||||
my $t = AttrVal($d, "subType", $defs{$d}{TYPE});
|
my $t = AttrVal($d, "subType", $defs{$d}{TYPE});
|
||||||
$t = AttrVal($d, "model", $t) if($t eq "unknown");
|
$t = AttrVal($d, "model", $t) if($t && $t eq "unknown"); # RKO: ???
|
||||||
$FW_types{$d} = $t;
|
$FW_types{$d} = $t;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2370,7 +2370,8 @@ FW_roomStatesForInform($)
|
|||||||
my @rl = devspec2array("room=$room");
|
my @rl = devspec2array("room=$room");
|
||||||
foreach my $dn (@rl) {
|
foreach my $dn (@rl) {
|
||||||
my ($allSet, $cmdlist, $txt) = FW_devState($dn, "");
|
my ($allSet, $cmdlist, $txt) = FW_devState($dn, "");
|
||||||
$data .= "$dn<<$defs{$dn}{STATE}<<$txt\r\n";
|
$data .= "$dn<<$defs{$dn}{STATE}<<$txt\r\n"
|
||||||
|
if($defs{$dn} && $defs{$dn}{STATE});
|
||||||
}
|
}
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user