3 ms·
One bit of cleverness I would like to see is allowing username and password to be entered together in the same field. Provide the normal, separate username and
by tzs 8y ago
One bit of cleverness I would like to see is allowing username and password to be entered together in the same field.
Provide the normal, separate username and password fields, and if both are filled out proceed normally.
If, however, the username is blank but the password is not, check to see if the value in the password field contains internal white space.
If it does, split it on the first run of internal white space, taking the resulting two strings as the username and password.
This allows entering both the username and password with a single paste operation. This would be convenient for people who are managing their passwords via some mechanism that cannot automatically fill out fields in their browser.
- enobrev 8y agoUnless you have spaces in your password
- lucb1e 8y agoThen just split on the first space (I do that a lot with text files that I parse, like `for line in file: date, hours_worked, comment = line.strip().split(' ', 2)`. The real issue starts when you have spaces in your username. We should just use some non-printable, like, I don't know... tab?
- tzs 8y agoIt's only a problem if you have leading spaces in your password. If you want the option of single field login you would have to avoid that. I suppose an interior space in a password also raises the possibility of accidentally logging in as someone else. Suppose your password is "foo bar.spam", and you try to login using the normal two field approach, so you put your username in the username field and "foo bar.spam" is the password field, but somehow botch filling out the username field so it is blank. The system will try the alternative interpretation, that you want to login as user "foo" with password "bar.spam". If there happens to be someone with "foo" as a username who happens to have "bar.spam" as a password, you will end up logged in as them! This could be addressed by requiring some special value in the username field to signal you want to use the one field option. Say, "a" as the username means look for combined username/password in the password field. It's slightly more work for the user as they do have to enter something in username now, but still only needs one copy/paste which is the main point.
- thinkloop 8y agoInteresting idea. Communicating that functionality in the UI seems like a nightmare. Instructions would have to be available strictly through irc accessible only via tor.