Commit graph

5 commits

Author SHA1 Message Date
Ed Sanders e405992015 Move var declarations inline
Change-Id: Ie8046d24268be2d22ab115a466422e7e3dd9a8e2
2023-11-10 18:27:55 +00:00
Klein Muçi 8ee570b3a7 Fix typo
Bug: T201491
Change-Id: I64175d78c3f01e4b2f2871e69c4b68a0c6d9f689
2022-05-03 16:05:43 +00:00
Daimona Eaytoy 607be2d5bb Check response code and prevent exception in worker-abusefilter
Bug: T274401
Change-Id: I53be8e91c8d4e85df8062504de19929994f56f15
2021-02-12 00:01:51 +00:00
Daimona Eaytoy 7c1d1c6d7d Return warnings from the parser, add warning for catch-all regexps
This commit introduces some boilerplate for emitting warnings from the
AbuseFilter parser, and also code for showing these warnings in the ace
editor. Adding new warnings should be as simple as appending to
AbuseFilterParser::warnings (and adding the relevant i18n).

Bug: T264768
Bug: T269770
Change-Id: Ic11021b379f997a89f59c8c0572338d957e089a6
2020-12-18 18:22:41 +01:00
Daimona Eaytoy 2a3b636a45 Run real-time validation of rules with an Ace worker
The worker itself is essentially a wrapper around the
abusefilterchecksyntax API.

NOTE: As written in code comments, basically the whole
worker-abusefilter.js script consists of boilerplate code. You can
verify this by diffing this file and 6cb8a9cae1/modules/ace/worker-json.js
This means that there are only ~60 lines of code to review in that file.

Bug: T187686
Change-Id: I8950fcd5917ba226dda80b47b2bb713e685fad36
2020-12-18 15:05:28 +00:00