amahi / platform

Core of the Amahi Platform, a web app in RoR
Other
139 stars 102 forks source link

Name to contain only characters [a-zA-Z]+ #245

Open AnshitaVishwa opened 5 years ago

AnshitaVishwa commented 5 years ago

In the plugin "users", The Name of the User should not contain any number or special characters, but it is accepting this format, during create user form and update name. I would like to work on this issue. Screenshot from 2019-10-25 15-40-19

td512 commented 5 years ago

I'm not entirely sure that's correct. the GECOS fields don't discriminate. The username definitely shouldn't contain special characters, but that should also yield to the rules of the system, those mainly being:

Aside from that, there's not really any limits on what the username may contain. The default regex for it is ^[a-z][-a-z0-9]*\$.

Bear in mind that's only if Amahi creates system accounts, and not just virtual users; i.e. real users that can log in to the host, rather than just to the dashboard. If it only creates virtual users, then there's no reason to discriminate at all

AnshitaVishwa commented 5 years ago

@td512 I agree to the rules for the username that you have told. Could you please help me out explaining the concept of real users and virtual users that you have explained in the last paragraph of your comment. Thanks!!

td512 commented 5 years ago

@AnshitaVishwa a virtual user is one that only exists in a database, if it's a real user then you can use it to SSH or locally login to the system