Vote #66497
完了Make login case-insensitive also for PostgreSQL
100%
説明
When using MySQL as the backend, it will automatically do case-insensitive comparisons.
For a PostgreSQL database, however, trying to log in with different capitalisation will result in either of the following error messages (paraphrased):
"User unknown" (when the user is not in LDAP or LDAP is not configured)¶
"User with this email address already exists" (when there is such a user in LDAP and automatic addition is enabled; this is more confusing than "User unknown")¶
This patch resolves this problem for all systems, trying to use indices as much as possible:
- For MySQL and PostgreSQL backends, it will even avoid table walks on successful attempts (there might be a table walk for unsuccessful logins with MySQL backend, depending on how MySQL's query optimiser works. Avoiding such a table walk for sure would require testing for the adapter in the controller, which I find pretty ugly).
- For sqlite, it is likely to cause a table walk when capitalisation differs (but I would expect anyone using sqlite as a production backend will have few enough users).
An alternative would be to downcase the login name always, but this would require updating existing databases and might upset users who are used to seeing their name in mixed case.
journals
Issue #2473 is similar to this one.
--------------------------------------------------------------------------------
A patch was committed in r3807 as part of #2473 that resolves this.
--------------------------------------------------------------------------------
related_issues
relates,Closed,2473,Login and mail should not be case sensitive
Admin Redmine さんがほぼ2年前に更新
- カテゴリ を Accounts / authentication_7 にセット
- 対象バージョン を 1.0.0 (RC)_14 にセット