diff --git a/lam/HISTORY b/lam/HISTORY index 74013c41..549a895c 100644 --- a/lam/HISTORY +++ b/lam/HISTORY @@ -1,5 +1,6 @@ June 2016 5.4 - Unix: support magic numbers for UIDs/GIDs (e.g. 389 server DNA plugin) + - Samba 3: support for Samba password history - LAM Pro: -> New module for 389ds unlocking and deactivation status -> Self registration: support for Google reCAPTCHA diff --git a/lam/lib/modules/sambaSamAccount.inc b/lam/lib/modules/sambaSamAccount.inc index 412d3766..dc56455c 100644 --- a/lam/lib/modules/sambaSamAccount.inc +++ b/lam/lib/modules/sambaSamAccount.inc @@ -2489,12 +2489,13 @@ class sambaSamAccount extends baseModule implements passwordService { * * @param String $password new password */ - private static function oldPasswordUsed($password, $attributes, $sambaDomain) { - if (empty($attributes['sambaPasswordHistory'][0]) || ($sambaDomain == null) + public static function oldPasswordUsed($password, $attributes, $sambaDomain) { + $attributes = array_change_key_case($attributes, CASE_LOWER); + if (empty($attributes['sambapasswordhistory'][0]) || ($sambaDomain == null) || !is_numeric($sambaDomain->pwdHistoryLength) || ($sambaDomain->pwdHistoryLength < 1)) { return false; } - foreach ($attributes['sambaPasswordHistory'] as $historyEntry) { + foreach ($attributes['sambapasswordhistory'] as $historyEntry) { if (sambaSamAccount::validateHistoryEntry($password, $historyEntry)) { return true; }