Giter Club home page Giter Club logo

Comments (5)

thorin avatar thorin commented on August 29, 2024

What's your database?

  • MySQL is case insensitive by default.

select * from users where login = 'SomeUser';
and select * from users where login = 'someuser';

... should return the same user.

  • If you're using PostgreSQL it's a bit more complicated:

You can try using the plugin: http://www.postgresql.org/docs/9.1/static/citext.html

 CREATE EXTENSION citext;
 ALTER TABLE users ALTER COLUMN login TYPE citext;

To support PostgreSQL I could provide a configurable option to ensure that all users are created and searched with a lowercase login.
But on login both SomeUser and someuser will still be considered as different users.

from redmine_ldap_sync.

nolar avatar nolar commented on August 29, 2024

Well, we use MySQL, and as a software developer I can say the query should not be case-insensitive by default, unless specifically said so (usually by WHERE lower(login) = lower('SomeUser') or like that).

I think, the comparison should be made inside LDAP Sync script only, thus not altering the logic of Redmine as a whole (we have three working auth sources β€” local, ldap, kerberos β€”Β and I'm not sure how this trick will afffect each of them).

Am I wrong?

from redmine_ldap_sync.

thorin avatar thorin commented on August 29, 2024

It actually can depend (for example in Oracle you can specify a collation for the database, the session, on the query to make the comparisons case insensitive. Eg. Latin1_General_CI_AI).

I understand what you're telling. I've tried the query on my MySQL server and it returns the same.
What I've told you was based both on the test and some searchs:
http://stackoverflow.com/questions/5629111/how-can-i-make-sql-case-sensitive-string-comparison-on-mysql

LDAP Sync can only do the same that redmine is doing. If redmine considers SomeUser and someuser as different users the plugin will have to do the same.

I'll do some tests on my enviromnent and see what can be done.

from redmine_ldap_sync.

thorin avatar thorin commented on August 29, 2024

It's a bug. Redmine considers both SomeUser and someuser as the same.
It will be fixed when possible.

from redmine_ldap_sync.

thorin avatar thorin commented on August 29, 2024

This should be fixed now.

Feel free to reopen the ticket if you need further help.

from redmine_ldap_sync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.