Before switching to OOUI, the throttle groups were specified in a raw textarea with no validation on it (sigh!) and this led to many curious situations. Some of them are already being handled in related tasks, but three aren't:
- Groups may be empty. This causes the filter not to throttle at all (groups are required), and is also responsible of T203535 and of PHP warning and notices shown (amongst the others) in AbuseFilter history.
- There may be extraneous stuff in there: for instance, misspelled groups ("suer" instead of "user"), non-working stuff ("*" to mean "use all criteria") or even pieces of filter syntax, erroneously pasted there.
The empty case must be handled separately, and I'd like to hear some thoughts about how. We could write a maintenance script to convert it to "user" (should be the default), but this could break filter history. An alternative would to emit some kind of warning (wfWarn?) for some time, then throw an exception in a future MW release. Handled in T203336.
As for the unknown stuff, this is not a real problem: we can intersect the array with the one of known value and get either a valid array, or one with an already mentioned problem. Again, I'm adding this to the script for T203336.