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:
parent
2cc6650bd8
commit
dd910a1313
@ -1076,9 +1076,13 @@ sub Calendar_Get($@) {
|
|||||||
return "argument is missing" if($#a != 2);
|
return "argument is missing" if($#a != 2);
|
||||||
my $regexp= $a[2];
|
my $regexp= $a[2];
|
||||||
my @uids;
|
my @uids;
|
||||||
foreach my $event ($eventsObj->events()) {
|
eval {
|
||||||
push @uids, $event->uid() if($event->summary() =~ m/$regexp/);
|
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);
|
return join(";", @uids);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user