Reproducability: always
Steps to reproduce:
1) install ldap-7.x-2.0-betaX (with X < 6)
2) enable "Encrypt Stored LDAP Passwords"
3) configure LDAP server using "Service Account Bind" DN & password
3a) configure LDAP services such as "User" and "Authentication"
4) update to ldap-7.x-2.0-beta6
5) perform any operation that uses LDAP

The definition of 'LDAP_SERVERS_ENC_TYPE_BLOWFISH' is missing from line 29 of ldap_servers/ldap_servers.module which breaks the encryption of stored LDAP passwords.
Causes PHP errors:

Notice: Use of undefined constant LDAP_SERVERS_ENC_TYPE_BLOWFISH - assumed 'LDAP_SERVERS_ENC_TYPE_BLOWFISH' in _ldap_servers_decrypt() (line 165 of /srv/www/research/sites/all/modules/ldap/ldap_servers/ldap_servers.encryption.inc).

It was there in 7.x-2.0-beta5 and working, missing from beta6 and today's dev snapshot.

So either restore LDAP_SERVERS_ENC_TYPE_BLOWFISH in ldap_servers.module or completely remove blowfish code from ldap_servers.encryption.inc.

CommentFileSizeAuthor
#13 error.png16.96 KBTharick
ldap_error_log.txt423 bytesdbfunk

Comments

johnbarclay’s picture

Status: Active » Needs review

thanks. This is fixed in head. Please test.

johnbarclay’s picture

Version: 7.x-2.0-beta6 » 7.x-2.x-dev
hwasem’s picture

I just updated (7.x-2.0-beta6) and received this error. I'm kind of new to this cutting edge thing, so where can I find the "head" version?

proteo’s picture

Same problem over here, should I use the dev version?

proteo’s picture

To answer my own question, the dev version doesn't solve the problem.

proteo’s picture

Got it. The fix is here:

http://drupalcode.org/project/ldap.git/blob/635e9c6:/ldap_servers/ldap_s...

Basically, just add:

define('LDAP_SERVERS_ENC_TYPE_BLOWFISH', 6);

to the line # 29 of the ldap_servers.module file.

johnbarclay’s picture

Head is 7.x-2.0-dev. Its at the bottom of: https://drupal.org/project/ldap

dbfunk’s picture

Thanks John, that fixed it.

johnbarclay’s picture

Status: Needs review » Closed (fixed)
hansfn’s picture

I just tested version 7.x-2.0-beta6 (updating from 7.x-2.0-beta5) and suddenly I couldn't log in - "failed to bind to ldap server". Updating to the HEAD version from git, enabled me to login again. I'm not sure if this issue is the one causing the problems, but I suspect so. Anyway, I think you should either remove 7.x-2.0-beta6 or release another beta very soon.

PS! I realize that I could have start a separate issue requesting a new beta release, but I considered that unnecessary noise.

charubachi’s picture

I am using LDAP version 7.x-2.0-beta6. and the issue is still there

hansfn’s picture

Yes, you shouldn't use 7.x-2.0-beta6. It's fixed in the dev version. Either stick to 7.x-2.0-beta5 or wait for the next beta.

PS! I deleted your other comment.

Tharick’s picture

StatusFileSize
new16.96 KB

Hi Folks,

Am using Drupal LDAP module, its all working fine in my localhost server (WAMP).

But, when I move to dev server, am getting the error "Failed to bind to server. ldap error #-1 Can't contact LDAP server".

By the way, I can't select the "Encrypt Stored LDAP Passwords", its disabled and it says "Encryption is not supported on this web server." . How I can enable this one may be it will "Blowfish or No Encryption".

Thanks in advance.