1
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-05-04 22:19:38 +00:00

57_Calendar: catch deadly regular expressions in get

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

View File

@ -1076,9 +1076,13 @@ sub Calendar_Get($@) {
return "argument is missing" if($#a != 2);
my $regexp= $a[2];
my @uids;
foreach my $event ($eventsObj->events()) {
push @uids, $event->uid() if($event->summary() =~ m/$regexp/);
}
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 {