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.
Comments
Comment #1
johnbarclay commentedthanks. This is fixed in head. Please test.
Comment #2
johnbarclay commentedComment #3
hwasem commentedI 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?
Comment #4
proteo commentedSame problem over here, should I use the dev version?
Comment #5
proteo commentedTo answer my own question, the dev version doesn't solve the problem.
Comment #6
proteo commentedGot 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.
Comment #7
johnbarclay commentedHead is 7.x-2.0-dev. Its at the bottom of: https://drupal.org/project/ldap
Comment #8
dbfunk commentedThanks John, that fixed it.
Comment #9
johnbarclay commentedComment #10
hansfn commentedI 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.
Comment #11
charubachi commentedI am using LDAP version 7.x-2.0-beta6. and the issue is still there
Comment #12
hansfn commentedYes, 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.
Comment #13
Tharick commentedHi 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.