Giter VIP home page Giter VIP logo

Comments (1)

Cossman251 avatar Cossman251 commented on September 21, 2024 1

Hi there,

yes I can confirm that there are two limits with LDAP authentication in general:

  1. Username ist always checked case sensitive. With Microsoft AD users wonder why they cannot login. To solve this a simple modification ist required.
  2. There will always be a limit with LDAP when using ldapsearch without pagination. Harder so solve.

I cannot give you a patch, but you can - perhaps - make the required modifications on your own. You need to change the following file:
backend/Services/Auth/Adapters/LDAP.php

Line 92 compares the given username with an array-entry of ALL (2nd problem) users:
if ($u['username'] == $username &&.......
Simply use strncase instead of "==" solves problem 1. Perhaps this could be a feature request, to add a new option "username_casesensisitve".

To solve 2 - the problem you described - there no easy way going. I think the limit is server side, not client side. But MS enables you to increase that limit in some way (with hard coded limit anyway).

The programmatic way would be to change function "getUsers()" with the call @ldap_search. This will always be limited since the developer uses pagination (would I would suggest here). Would be about 20 lines more code. In General the authentication method is not very good: When a user enters his name, why do you need to get all users from LDAP to find the correct username. Simply use a LDAP-Filter to only return the LDAP-Entry of the user who wants to log in.

My quick but dirty workaround was to rewrite the function getUsers() to getUsers($username_filter="*"). The parameter filter is the username (if available). The filter parameter then replaces a place holder in "$this->ldap_filter", so that I only collect the user who actually wants to login from ldap.

from filegator.

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.