Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: LDAP module should be able to anonymous bind #11509

Closed
sunflowerbofh opened this issue Jul 15, 2022 · 1 comment
Closed

[Feature Request]: LDAP module should be able to anonymous bind #11509

sunflowerbofh opened this issue Jul 15, 2022 · 1 comment
Assignees

Comments

@sunflowerbofh
Copy link
Contributor

Is your feature request related to a problem? Please describe.

When an LDAP server works with anonymous bind only the LDAP module is not usable (throws errors, Login Failed...).

Describe the solution you'd like

Merging the pull request I will launch after this.

     }
  •    if (! $ldapbind = @ldap_bind($connection, $ldap_username, $ldap_pass)) {
    
  •        throw new Exception('Could not bind to LDAP: '.ldap_error($connection));
    
  •    }
    
  •    // TODO - this just "falls off the end" but the function states that it should return true or false
    
  •    // unfortunately, one of the use cases for this function is wrong and *needs* for that failure mode to fire
    
  •    // so I don't want to fix this right now.
    
  •    // this method MODIFIES STATE on the passed-in $connection and just returns true or false (or, in this case, undefined)
    
  •    // at the next refactor, this should be appropriately modified to be more consistent.
    
  • }
  •           if ( $ldap_username ) {
    
  •                   if (! $ldapbind = @ldap_bind($connection, $ldap_username, $ldap_pass)) {
    
  •                           throw new Exception('Could not bind to LDAP: '.ldap_error($connection));
    
  •                   }
    
  •                   // TODO - this just "falls off the end" but the function states that it should return true or false
    
  •                   // unfortunately, one of the use cases for this function is wrong and *needs* for that failure mode to fire
    
  •                   // so I don't want to fix this right now.
    
  •                   // this method MODIFIES STATE on the passed-in $connection and just returns true or false (or, in this case, undefined)
    
  •                   // at the next refactor, this should be appropriately modified to be more consistent.
    
  •           } else {
    
  •                   if (! $ldapbind = @ldap_bind($connection )) {
    
  •                           throw new Exception('Could not bind to LDAP: '.ldap_error($connection));
    
  •                   }
    
  •           }
    
  •   }
    

Describe alternatives you've considered

Not using anonymous bind (but we need it for other applications as well)

Additional context

Feel free to test with active directory as we have none.

@welcome
Copy link

welcome bot commented Jul 15, 2022

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

sunflowerbofh added a commit to sunflowerbofh/snipe-it that referenced this issue Jul 15, 2022
sunflowerbofh added a commit to sunflowerbofh/snipe-it that referenced this issue Jul 15, 2022
@snipe snipe assigned uberbrady and unassigned snipe Jul 16, 2022
sunflowerbofh added a commit to sunflowerbofh/snipe-it that referenced this issue Aug 2, 2022
snipe added a commit that referenced this issue Aug 22, 2022
@snipe snipe closed this as completed in 9d62793 Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants