canonical / lightdm

Display Manager
GNU General Public License v3.0
838 stars 138 forks source link

Strip spaces from start (and end?) of login name #215

Open martinwguy opened 3 years ago

martinwguy commented 3 years ago

It occasionally happens that I have typed a space at the start of the login name, which then fails to login saying "Password incorrect" and I then find myself typing the password several times until I notice that there's a tiny space at the start of the login name, so I switch back to that and cancel the space, which makes it clear the password which I have to type again.

Assuming I'm not the only one in the world who sometimes wakes up a sleeping computer by poking space, I think trimming space(s) from the start (and presumably the end too) of the username would occasionally save some people a little time and surprise. After all, Unix usernames cannot start or end with space.

charlesgoyard commented 6 months ago

This is a duplicate of #14, and has to be fixed in each and every greeter. See this pull request for the gtk-greeter patch.