I think your approach of trying to filter out common known attacks will be a constant battle. Instead of attempting that, why don't you simply HTML-filter attack? Usernames should not contain (or be interpolated as) HTML. See for example homoglyph attacks like tye&nbsbp; which really, really looks like tye but with whitespace at the end.
In reply to Re: Input Validation for Template Toolkit
by Corion
in thread Input Validation and pattern matching in Template Toolkit
by dipit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |