プロジェクト

全般

プロフィール

Vote #66497

完了

Make login case-insensitive also for PostgreSQL

Admin Redmine さんがほぼ2年前に追加. ほぼ2年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Accounts / authentication_7
対象バージョン:
開始日:
2010/02/03
期日:
進捗率:

100%

予定工数:
category_id:
7
version_id:
14
issue_org_id:
4732
author_id:
11448
assigned_to_id:
5
comments:
2
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0