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

rocketchat doesn't dereference LDAP aliases (derefAliases) #3660

Closed
jhilaire-cls opened this issue Jun 30, 2016 · 2 comments
Closed

rocketchat doesn't dereference LDAP aliases (derefAliases) #3660

jhilaire-cls opened this issue Jun 30, 2016 · 2 comments

Comments

@jhilaire-cls
Copy link

jhilaire-cls commented Jun 30, 2016

RocketChat version: 0.35.0
I connected rocketchat to an openLDAP directory, however in the LDAP base where rocketchat is configured to search its users, there are only LDAP aliases. By default Rocketchat doesn't dereference aliases, so the authentication doesn't work and there is no option to allow aliases dereferencing in rocketchat.
To allowed aliases dereferencing, my patch look like this:

--- a/packages/rocketchat-ldap/server/ldap.js
+++ b/packages/rocketchat-ldap/server/ldap.js
@@ -221,7 +221,8 @@ LDAP = class LDAP {
const searchOptions = {
filter: domain_search.filter.replace(/#{username}/g, username),

  •                   scope: 'sub'
    
  •                   scope: 'sub',
    
  •                   derefAliases: 3
              };
              logger.search.info('Searching user', username);
    

@@ -259,7 +260,8 @@ LDAP = class LDAP {
const searchOptions = {
filter: filter,

  •                   scope: 'sub'
    
  •                   scope: 'sub',
    
  •                   derefAliases: 3
              };
              logger.search.info('Searching by id', id);
    

@@ -288,7 +290,8 @@ LDAP = class LDAP {
const searchOptions = {
filter: domain_search.filter.replace(/#{username}/g, username),

  •                   scope: 'sub'
    
  •                   scope: 'sub',
    
  •                   derefAliases: 3
              }; 
              logger.search.info('Searching user', username);
    
@jhilaire-cls jhilaire-cls changed the title rocketchat doesn't dereference LDAP aliases (derefAlias) rocketchat doesn't dereference LDAP aliases (derefAliases) Jun 30, 2016
@jhilaire-cls
Copy link
Author

Deref Alias still not working in 0.36.0, the same modification as described above should be made in the file server/packages/rocketchat_ldap.js (instead of file packages/rocketchat-ldap/server/ldap.js in 0.35.0)

@TwizzyDizzy
Copy link

@rocket-cat close

Can you please try to reproduce this on latest stable? You might also have a look at #890 if it's related. If the issue at hand is still there and different than the issue mentioned before, please get back to me, I'll happily reopen :)

Cheers
Thomas

@rocket-cat rocket-cat bot closed this as completed Mar 21, 2018
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

2 participants