Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 394479

Summary: login page should strip blanks
Product: [ECD] Orion Reporter: Susan McCourt <susan>
Component: ClientAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, david, jparks, ken_walker, mamacdon
Version: 1.0Keywords: helpwanted
Target Milestone: 5.0 M1Flags: jparks: review?
Hardware: PC   
OS: Windows 7   
Whiteboard:

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.