notify: check for regexps starting with *
git-svn-id: https://svn.fhem.de/fhem/trunk@5398 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -35,6 +35,7 @@ notify_Define($$)
|
||||
}
|
||||
|
||||
# Checking for misleading regexps
|
||||
return "Bad regexp: starting with *" if($re =~ m/^\*/);
|
||||
eval { "Hallo" =~ m/^$re$/ };
|
||||
return "Bad regexp: $@" if($@);
|
||||
$hash->{REGEXP} = $re;
|
||||
|
||||
Reference in New Issue
Block a user