I'm using taint mode and would like to taint valid usernames and passwords. basically i'm not sure what to allow and what not to allow. Should passwords only allow alphabetical and numerical characters? or can a password be "This_is-my|pass,,word"I don't see a reason to put any limitations on passwords, except disallowing characters that make it hard to input passwords, or to sling them around between functions. I'd forbid the NUL character "\x00", carriage return, "\cM" and linefeed, "\cJ".
As for usernames, it depends on what you are going to use them for. If it's purely used for authentication, there aren't many limits. If user names also need to be printed, you probably want to disallow unprintable characters, and maybe whitespace as well. Perhaps you want user names to be case insensitive, or perhaps you don't care to have a "carry", "Carry" and a "CARRY" on your system. What to allow and what not to allow for user names is something you should decide, and you should be guided by what you want to use (or plan to use) usernames for.
In reply to Re: Regex usernames and Passwords
by Anonymous Monk
in thread Regex usernames and Passwords
by tanger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |