Unable to create or edit users with Cyrillic logins
|Category:||Accounts / authentication|
Used version: 4.2.1.stable (Bitnami Redmine Stack)
Tested on fresh new install.
Tested on upgraded from 4.0.3 install.
I'm unable to create new or modify existing users with Cyrillic login. Error is: “Login is invalid”.
Existing user accounts works fine. Also, I can create user manually via direct DB queries without any problems.
There was no such problem on 4.0.3.
Already reported on Bitmani Forums, but this error occurs even on fresh new install, so I'm also report it here.
#4 Updated by Pavel Rosický about 1 year ago
unfortunatelly Cyrillic logins aren't allowed for more then 13 years
# Login must contain letters, numbers, underscores only validates_format_of :login, :with => /\A[a-z0-9_\-@\.]*\z/i
and LDAP logins also triggers validation
so the only way to bypass the validation should be altering the source code, 3rd party plugins, or of course direct import to the database. Nothing official.
https://www.redmine.org/issues/6166 is basically the same problem with german characters, but no one seems to be interested.
#5 Updated by Roman K about 1 year ago
- Status changed from New to Resolved
Yeah, totally forgot about this small edit in app/models/user.rb:
validates_format_of :login, :with => /[а-яА-ЯёЁa-zA-Z0-9_\-@\.]*/i
seems like it can resolve problem with german characters.
Personally, I dont understand such decision, its UTF-8 already, whats the point in filtering this characters?
3 years with cyrillic logins, no problems.