2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

57_Calendar: catch deadly regular expressions in get

git-svn-id: https://svn.fhem.de/fhem/trunk@8644 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
borisneubert 2015-05-28 17:55:18 +00:00
parent 4b37d7ff0e
commit eae1c17c17

View File

@ -1076,9 +1076,13 @@ sub Calendar_Get($@) {
return "argument is missing" if($#a != 2);
my $regexp= $a[2];
my @uids;
eval {
foreach my $event ($eventsObj->events()) {
push @uids, $event->uid() if($event->summary() =~ m/$regexp/);
}
};
Log3($hash, 2, "Calendar " . $hash->{NAME} .
": The regular expression $regexp caused a problem: $@") if($@);
return join(";", @uids);
} else {