xLink / CybershadeCMS

[Abandoned][Broke] Repo for CybershadeCMS
1 stars 0 forks source link

User::validateUsername(); #16

Open xLink opened 11 years ago

xLink commented 11 years ago

In the ACP I beleive we should be giving the administrator the ability to choose what sets of charaters he wants to allow in the CMS..

The panel could look something like this following ASCII Rendering;

[ ] Upper & Lower case English alphabet ( [a-zA-Z] ) [ ] Digits ( [0-9] ) [ ] "Simple Special Characters" ( [!@#$%^&()<>?:"|{}+_/`] etc ) [ ] "Extended Special Characters" - this will be the foreign language set

The idea here, is to be able to tick what you want to allow, the functionality should take this into account when testing a username being valid, and any escaping should be done to make sure no vulnerabilities either client or server side.

Thoughts?

MantisSTS commented 11 years ago

Yeah good idea, I don't see how difficult that would be, but obviously by default needs to just be Upper+Lower (Maybe Digits)

MantisSTS commented 11 years ago

Infact, the default should be \w

tobe commented 11 years ago

How about making an input field and a couple of checkboxes which would on being checked populate the input field with regex. This way both inexperienced users and users who understand regular expression can use such?

xLink commented 11 years ago

the regex options above just represent the options we have availiable, not what will actually show on the users end. we'll come up with better names for em :P

MantisSTS commented 11 years ago

I think what Infy means is that we should give the admins an input field which allows them to put in their custom Regex, so they can specify exactly the patterns that they want, for example: [a-z]{4,} or something similar.

xLink commented 11 years ago

oh i see, overcomplicating things a little i think, im all up for having control, but most systems dont let you do with the username in the first place nvm select the pattern to match it against

tobe commented 11 years ago

@DarkMantisCS Indeed! Experienced users may edit the input field themselves, or it can be manipulated via the checkboxes.

MantisSTS commented 11 years ago

I don't think it's overcomplicated I think its customizable. Imo, it should be implemented