Skip to content

Commit 9d69e11

Browse files
authored
Changed character encoding for password to iconv()
1 parent a716311 commit 9d69e11

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/password/drivers/ldap_samba_ad.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ public function save($curpass, $passwd)
5050
return $ret;
5151
}
5252

53-
$hash = password::hash_password($passwd, 'ad');
54-
55-
$entry = ['unicodePwd' => $hash];
53+
$entry = [
54+
'unicodePwd' => iconv("UTF-8", "UTF-16LE", '"' . $passwd . '"')
55+
];
5656

5757
$this->_debug("C: Replace password for {$this->user}: " . print_r($entry, true));
5858

0 commit comments

Comments
 (0)