Page MenuHomePhabricator

match-empty-regex no longer emitted by the parser
Closed, ResolvedPublic

Description

The parser should give a warning if a regexp matches the empty string, however it's no longer doing that. Looking at the code this is fairly obvious, since we pass an AFPData to checkRegexMatchesEmpty, but that method doesn't parse the regexp correctly (i.e. slashes are not escaped, and delimiters aren't added), so it never matches.

Event Timeline

Change 697103 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/AbuseFilter@master] Pass a valid regexp to preg_match in checkRegexMatchesEmpty

https://gerrit.wikimedia.org/r/697103

Change 697103 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] Pass a valid regexp to preg_match in checkRegexMatchesEmpty

https://gerrit.wikimedia.org/r/697103