10_MQTT2_DEVICE.pm: limit the autocreated json2nameValue to 10k (Forum #104687)

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@20396 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2019-10-22 18:45:21 +00:00
parent 1e173a0c6e
commit 19c56f7e01

View File

@ -189,7 +189,7 @@ MQTT2_DEVICE_Parse($$)
my $cidArr = $modules{MQTT2_DEVICE}{defptr}{cid}{$newCid}; my $cidArr = $modules{MQTT2_DEVICE}{defptr}{cid}{$newCid};
return if(!$cidArr); return if(!$cidArr);
my $add; my $add;
if($value =~ m/^{.*}$/s) { if(length($value) < 10000 && $value =~ m/^{.*}$/s) {
my $ret = json2nameValue($value); my $ret = json2nameValue($value);
if(keys %{$ret}) { if(keys %{$ret}) {
$topic =~ m,.*/([^/]+),; $topic =~ m,.*/([^/]+),;