Defect #35355
openUnable to create or edit users with Cyrillic logins
0%
Description
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.
Updated by Roman K over 3 years ago
- redmine:latest
- redmine:4.1.3
- redmine:4.0.9
from DockerHub and issue occurs there.
Updated by Roman K over 3 years ago
That's strange: i've tested ALL versions of redmine and no one can create users with Cyrillic logins.
But how we are using redmine with Cyrillic login users for years?!
Updated by Roman K over 3 years ago
Restored old backup of version 4.0.1 and dont have this issue.
But on fresh 4.0.1 (via bitnami or docker image) I have this issue.
I totally dont understand whats going on.
Updated by Pavel Rosický over 3 years 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
https://github.com/redmine/redmine/blob/master/app/models/user.rb#L110
and LDAP logins also triggers validation
https://github.com/redmine/redmine/blob/master/app/models/user.rb#L253
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.
Updated by Roman K over 3 years 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.
Thank you.
Updated by Pavel Rosický over 3 years ago
maybe UTF-8 (and Ruby support) wasn't so common 13 years ago.
I don't see any valid reason why not to make it less strict and allow such characters, but I'm not a Redmine's maintainer...