Project

General

Profile

Actions

Patch #811

open

Username validation - allow spaces...

Added by Jason Milkins about 16 years ago. Updated over 9 years ago.

Status:
New
Priority:
Normal
Category:
Accounts / authentication
Target version:
-
Start date:
2008-03-08
Due date:
% Done:

0%

Estimated time:

Description

I've tested a very simple patch with a test installation of RedMine to allow usernames with spaces.

I have modified the RegEx in app/models/user.rb ...

validates_format_of :login, :with => /^[a-z0-9_\-@\.]*$/i

to

validates_format_of :login, :with => /^[a-z0-9 _\-@\.]*$/i

After running a number of simple tests (as follows)

  • Login
  • LDAP autogenerate user
  • Add Issue
  • List Issues
  • Filter Issues
  • View Activity
  • View Homepage
  • Add Member to Project
  • Assign Issue To

I have experienced no problems with this patch.

After a reviewing a reasonable amount of code it appears that db:user/id is used for the username xref'ing and the visible login name is only used for display and initial login.

Is there any further rationale for disallowing spaces in usernames?

Here is my rationale for usernames which include spaces.

My need for spaced usernames is linked to deployment, esp. with auto generating accounts with LDAP. Our Windows AD was setup with First Last style logins... and so we have to go through the process of user education if we are going to use an alternative LDAP property, in our case MailNickname, to login.

As you can appreciate logging in with their accustomed username would be a far easier solution, in terms of human engineering.

I think this would be helpful to a number of possible enterprise users too.


Related issues

Related to Redmine - Defect #2638: LDAP authentication should allow username to contain space(s)New2009-02-01

Actions
Related to Redmine - Feature #6166: Support german umlauts and whitespaces in login stringNew2010-08-18

Actions
Has duplicate Redmine - Feature #10810: Allow Login IDs with spaces in themClosed

Actions
Actions

Also available in: Atom PDF