Page MenuHomePhabricator

Reusable user-input validation (possibly with existing external validation libraries)
Open, MediumPublic

Description

Consolidate the wide variety of user content validation (spam filtering, etc) to allow the same constraints on user input to be applied by extensions. This could be done utilizing a validation library like Symfony\Validator, but there are likely other candidate libraries. The main goal is to take all of the varied validation from core and make it directly re-usable in extensions to receive the same guarantee's against accepting unwanted content.

Taken from 2014-15 Q2 priorities planning worksheet

Event Timeline

bd808 raised the priority of this task from to Needs Triage.
bd808 updated the task description. (Show Details)
bd808 added a subscriber: bd808.

Flow has collected most of the spam prevention techniques (that we know of) in mediawiki into https://phabricator.wikimedia.org/diffusion/EFLW/browse/master/includes/SpamFilter/ . This is basically a simple interface with a validate() method and an implementation for each one. They are currently a bit Flow specific but could likely be generalized into something that could be provided by each type of spam preventions implementation.

At a higher level though i would like to tie this into a full fledged validation system, rather than just this one-off validation of spamminess. It seems the best bay forward would be to review and summarize commonly used php validation libraries and propose an RFC?