Skip to content

LDAP search filter cannot be configured if too many OUs or filters are nested #4121

Closed

Description

@darius1706

Feature Request

Is your feature request related to a problem? Please describe

There is too short db column (and variable limit) for ldap filter. Currently is 128 characters in table user_domains_ldap, column search_filter. It would be better to make bigger, if we want restrict user by group, its too short.

I expanded column to 512 characters, but it could be bigger. It looks I have to change max_length of search filter in file user_domains.php to 'max_length' => '4096'

Please consider to make search filter bigger.

Thank you
Radek

Activity

  1. netniV commented on Feb 10, 2021

    @netniV
    Member

    I would say this is more a bug fix than an enhancement as the short limit could prevent access to more deeply nested ou's when finding accounts etc.

  2. added
    bugUndesired behaviour
    and removed
    enhancementGeneral tag for an enhancement
    on Feb 10, 2021
  3. added this to the v1.2.17 milestone on Feb 12, 2021
  4. added a commit that references this issue on Feb 12, 2021
  5. anarkia1976 commented on Feb 15, 2021

    @anarkia1976

    Hi Guys @TheWitness & @netniV ,

    today i have updated cacti to the last commits, but i have a problemi with the script for update the database:
    php -q cli/upgrade_database.php --forcever=1.1.38
    Upgrading from v1.1.38
    Upgrading from v1.1.38 (DB 1.2.16) to v1.2.0
    ++++++++++++++-++++++++++++++++++++++++++++Upgrading from v1.2.0 (DB 1.2.16) to v1.2.1
    ++Upgrading from v1.2.1 (DB 1.2.16) to v1.2.2
    ++Upgrading from v1.2.2 (DB 1.2.16) to v1.2.3
    ++++++Upgrading from v1.2.3 (DB 1.2.16) to v1.2.5
    +++Upgrading from v1.2.5 (DB 1.2.16) to v1.2.7
    -Upgrading from v1.2.7 (DB 1.2.16) to v1.2.8
    +++++Upgrading from v1.2.8 (DB 1.2.16) to v1.2.11
    +Upgrading from v1.2.11 (DB 1.2.16) to v1.2.14
    +Upgrading from v1.2.14 (DB 1.2.16) to v1.2.15
    +Upgrading from v1.2.15 (DB 1.2.16) to v1.2.17
    ++x
    ################################
    [Fail] - DB Exec Failed!, Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'TABE user_domains_ldap MODIFY COLUMN search_filter VARCHAR(512) NOT NULL defa...' at line 1
    +------------------------------+
    ALTER TABE user_domains_ldap MODIFY COLUMN search_filter VARCHAR(512) NOT NULL default ""
    ################################

    Do you have suggestions?

    The only way to fix it is to revert this commit:

    commit e5f7e5a
    Author: TheWitness thewitness@cacti.net
    Date: Thu Feb 11 19:25:47 2021 -0500
    Fixing Issue #4121
    Too short search filter for Ldap - Cacti 1.2.2

    thanks a lot.

  6. TheWitness commented on Feb 15, 2021

    @TheWitness
    Member

    I recommend myself to get glasses. 😎

  7. added a commit that references this issue on Feb 15, 2021
  8. TheWitness commented on Feb 15, 2021

    @TheWitness
    Member

    Okay, all fixed up. Just repull the 1.2.x branch and rerun.

  9. anarkia1976 commented on Feb 16, 2021

    @anarkia1976

    All is working now. thanks a lot.

  10. changed the title [-]Too short search filter for Ldap - Cacti 1.2.2.[/-] [+]LDAP search filter cannot be configured if too many OUs or filters are nested[/+] on Apr 30, 2021
  11. locked and limited conversation to collaborators on Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourresolvedA fixed issue

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions