Merge lp:~uoms-gregt/lightdm-gtk-greeter/trim-username into lp:lightdm-gtk-greeter
Status: | Needs review |
---|---|
Proposed branch: | lp:~uoms-gregt/lightdm-gtk-greeter/trim-username |
Merge into: | lp:lightdm-gtk-greeter |
Diff against target: |
55 lines (+10/-5) 1 file modified
src/lightdm-gtk-greeter.c (+10/-5) |
To merge this branch: | bzr merge lp:~uoms-gregt/lightdm-gtk-greeter/trim-username |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
LightDM Gtk+ Greeter Development Team | Pending | ||
Review via email: mp+362953@code.launchpad.net |
Commit message
Ignore whitespace before and after username when authenticating.
Description of the change
Our use case:
Users press the space bar to either power up the computer or bring the monitor out
of sleep. If the computer is already powered on then that keypress propagates to the username
field in lightdm-
Given that whitespace can never be part of a valid username (cf IEEE 1003.1-2001), this patch trims the beginning and end of the username string before passing it to the authentication code. <Space> characters still appear in the username field, but have no effect.
To test:
At a lightdm login prompt, type:
<space>username
or:
username<space>
then enter your password.
Pre-patch:
The login will fail.
Post-patch:
The login will succeed.
Unmerged revisions
- 477. By Greg Trounson <email address hidden>
-
Ignore whitespace before and after username when authenticating