Add new password encodage ('ad') in ldap password drivers (#1489349)
| | |
| | | |
| | | // LDAP password hash type |
| | | // Standard LDAP encryption type which must be one of: crypt, |
| | | // ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, or clear. |
| | | // ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, ad or clear. |
| | | // Please note that most encodage types require external libraries |
| | | // to be included in your PHP installation, see function hashPassword in drivers/ldap.php for more info. |
| | | // Default: 'crypt' |
| | |
| | | } |
| | | break; |
| | | |
| | | case 'ad': |
| | | $cryptedPassword = rcube_charset::convert('"' . $passwordClear . '"', RCUBE_CHARSET, 'UTF-16LE'); |
| | | break; |
| | | |
| | | case 'clear': |
| | | default: |
| | | $cryptedPassword = $passwordClear; |
| | |
| | | return false; |
| | | } |
| | | break; |
| | | case 'ad': |
| | | $crypted_password = rcube_charset::convert('"' . $password_clear . '"', RCUBE_CHARSET, 'UTF-16LE'); |
| | | break; |
| | | case 'clear': |
| | | default: |
| | | $crypted_password = $password_clear; |