Actions
Patch #4732
closedMake login case-insensitive also for PostgreSQL
Status:
Closed
Priority:
Normal
Assignee:
Category:
Accounts / authentication
Target version:
Start date:
2010-02-03
Due date:
% Done:
100%
Estimated time:
Description
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):
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")
- 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.
Files
Related issues
Updated by Stanislav German-Evtushenko over 14 years ago
Issue #2473 is similar to this one.
Updated by Eric Davis about 14 years ago
- Status changed from New to Closed
- Assignee set to Eric Davis
- Target version set to 1.0.0 (RC)
- % Done changed from 0 to 100
Actions