Bug 394479 - login page should strip blanks
Summary: login page should strip blanks
Status: RESOLVED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: Client (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 5.0 M1   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2012-11-16 11:20 EST by Susan McCourt CLA
Modified: 2013-11-06 12:07 EST (History)
5 users (show)

See Also:
jparks: review?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Susan McCourt CLA 2012-11-16 11:20:17 EST
Last night I was logging in to orion from my ipad and when I hit "space" to autocomplete the user name, I must have hit it again.  Somehow I ended up with a space after my username.  Of course I couldn't see it.  The login kept failing, I must have typed my password 3-4 more times before deciding it must be something besides me typing the password wrong.

It would be good to strip blanks....
Comment 1 Josh Parks CLA 2012-11-19 13:11:25 EST
GitHub URL: https://github.com/jparks06/orion.client.git
Branch: Bug394479
Commit ID: c81e72731e4f93eefdf3cc0dbb6093575b47ecdb

Added a simple regular expression to remove all blanks from the username field before processing an Orion account login (web/mixloginstatic/LoginWindow.js). No changes were made to password entries or other login options (Google login, Mozilla persona).
Comment 2 Curtis Windatt CLA 2013-11-05 17:30:54 EST
https://github.com/mrennie/orion.client/commit/7520822867e88ef52da16af9b48c280f8582db9d

Updated commit on github fork. I can make a pull request or a gerrit change if requested.

I used trim() over replacing all whitespace.  I doubt we support whitespace inside a user name, but having "c w indatt" be valid seems wrong.  Newer browsers will have trim() implemented, but if older support is required we can just use the regex replace /^\s+|\s+$/g.