User:Legoktm/Spam filter redo
Appearance
Currently most anti-spam and related checks are in EditPage, or directly tied to it. This should be split out into a pluggable system that is significantly more flexible and requires less upon global state.
Existing checks
[edit]- SimpleAntiSpam - adds a form field with message, checks its value, reports an error message, and rejects the edit
- Check summary spam regex, checks edit summary against regexes, reports an error message, and rejects the edit
- Check spam regex against the current textbox (not merged), reports an error message, and rejects the edit
- EditFilter hook: provides EditPage, not merged textbox, section URL parameter (new or a number), edit summary, and error to output
- TitleBlacklist uses it, but that usage is actually wrong and it should be using EditFilterMergedContent
- SpamBlacklist too, and it is also using it wrongly
- This code isn't even being run due to phab:T169838.
- Check whether user is blocked, and if so, spread the autoblock