morria/Unreal — pull request #3 by ziel (2013-01-28 21:39:30+00:00)
Title: Initial impl for storing usernames base64'd

So, this encodes the username internally as base64'd thing, and remove's the @ stripping. It also covers decoding via the most obvious cases: connect/disconnect log messages, welcome message, whois and who output. Finally, it decodes for who +u username searches as well.

The decoding isn't checked at the moment, so we may want to add some sort of filter to it which pulls out nasties, but is a little more chill than the original a-zA-Z_. thing. I've left the initial username safeties in place, but they're kind of hamstrung by the b64ing happening before them, so they might want to end up elsewhere in the future.

Anyhow, this is just an initial shot at the thing.. for discussion or whatevs. This should be considered experimental until we feel good about security implications et al.

One more note: I've set USERLEN to 63. This has some implications like:
- it takes up more space than 10
- usernames will still be truncated. since b64 can be longer than the name, this happens somewhere before the 63 limit. I tested this with long usernames and they seem to be handled (via truncation) fwiw.