Modify

Opened 14 years ago

Closed 13 years ago

#7087 closed defect (fixed)

Trailing spaces are not being removed from the username

Reported by: pablo.grana@… Owned by: Steffen Hoffmann
Priority: normal Component: AccountManagerPlugin
Severity: normal Keywords: user register name check
Cc: Trac Release: 0.11

Description

If I add a new user permission with a trailing space in the user name, that space is not removed from the username. So if I add:

'user' 'user ' 'user '

Then I see three times the same user.

So, spaces should be trimmed from the user names, or the space should be somehow marked in the output.

Attachments (0)

Change History (3)

comment:1 Changed 14 years ago by pablo.grana@…

Additional comment: I am using sqlite3 database. The version I'm using does not support trim/ltrim/rtrim fuctions.

comment:2 Changed 13 years ago by Steffen Hoffmann

Keywords: user register name check added
Owner: changed from John Hampton to Steffen Hoffmann
Status: newassigned
Summary: Trailing spaces are not being removed from the user nameTrailing spaces are not being removed from the username

Confirmed by own tests. This is really irritating, since the spaces are even truncated for display in accounts list on user admin page.

I'll try to resolve this for the registration module together with #5295.

comment:3 Changed 13 years ago by Steffen Hoffmann

Resolution: fixed
Status: assignedclosed

We've got some suggestions and even patches to improve checking for invalid usernames in the registration procedure. Therefore now we've added the following checks in [9260]:

  • against a list of reserved names (refs #5295)
  • against a admin-configurable character blacklist, by default containing
    • colon, since it's corrupting HtPasswdStore (closes #4682)
    • '[' and ']', since they're corrupting SvnServePasswordStore (closes #2630)

Additionally we're taking care of and instantly remove surrounding whitespace around usernames and email addresses (closes #7087).

Thanks to all contributors, especially to manski, for exceptional help by reviewing tickets and bundling related issues.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.