Join GitHub today
Non-ASCII password on user creation leads to 'User(...) already exists' #1555
Looking for possible NAS solutions and I stumbled over Rockstor today. I am already successfully using btrfs on my laptop, so this looks very interesting to me.
Anyway. When attempting to create the first user through the WebGUI wizard I used a password with non-ASCII characters which lead to the following issue. (As can be seen in the screenshots, this is reproducible when simply creating a new user.)
There appears to be no hint on allowed characters and no password validation whatsoever? Fair enough. Change the password to all-ASCII characters and try again:
As a workaround I used a different username. This is all for testing purposes on a VM anyway, so it's not a big deal. The username later appears in the list of
I'd suggest either adding validation as it appears to be done for the username or edit the python script to perform whatever encoding has to be performed before the user creation? Unfortunately, I haven't done any python yet myself ..
I am running Rockstor version
@ansemjo Thanks for the excellent bug report, and nice find. There is as you say definitely a need for improvement here. As to your "Unfortunately, I haven't done any python yet myself ..." I wouldn't let that bother you as it is incredibly accessible. I would like to encourage you to take a look at the indicated code and have a dabble.
We have a Developers section of the Contributing to Rockstor - Overview in the official docs. This walks you through getting setup to submit fixes. And you have already gotten started with the first bit (this issue) and are obviously not new to GitHub so that bit's all sorted.
I agree that we need better user facing info on allowed characters so that's just adding a popup hint. Followed by a little more input validation. I know it's easier said than done but I suspect it's going to be easier than you think.
Thanks again and if you fancy having a go then just note here that you are dabbling and ask questions as you go. Also the Rockstor forum is pretty active and friendly and all current developer are also members.
Sure, I'll try and look into it. :) Thanks for the links to the docs!
Just for later reference, need these packages to build on the VM:
This could be a nice small enhancement you can (if you want) accomplish 3 different ways:
My personal opinion: I always try to think about my 90yrs old grandma using computers so I'd get option 1 (I tell you, but I don't force you - if you're a sysadmin/super user managing Rockstor & sensible data I suppose you'll create a strong password, if not...my grandma will kick you! :P)
Anyway, have fun!
Thanks for the warm welcome!
If I were to add any kind of validation I'd probably do it in the backend but I'd also only force a minimum length of, say, 6-8 characters or so. No hard restrictions on complexity. I would add that as hints or tooltips, like you suggested.
However, I would also seperate those concerns. Yes, it would be a nice addition and I'll probably try my hand at it too when I can find some time for it. But it is not strictly necessary to fix the issue at hand .. personally, I'd consider a seperate issue / PR at a later time for that.