The encodePassword() functions failes on multibyte strings like utf-8 passwords with german umlauts (ä,ö,ü,ß, etc.) because the functions just adds zerobytes after every character which ends up in invalid utf-16le.
I replaced the original function:
public function encodePassword($password)
{
$password=""".$password.""";
$encoded="";
for ($i=0; $i <strlen($password); $i++){ $encoded.="{$password{$i}}\000"; }
return $encoded;
}
with this:
public function encodePassword($password)
{
$encoded = mb_convert_encoding('"' . $password . '"', 'utf-16le', 'utf-8');
return $encoded;
}
this worked for me.
have a nice day, johannes
The encodePassword() functions failes on multibyte strings like utf-8 passwords with german umlauts (ä,ö,ü,ß, etc.) because the functions just adds zerobytes after every character which ends up in invalid utf-16le.
I replaced the original function:
public function encodePassword($password)
{
$password=""".$password.""";
$encoded="";
for ($i=0; $i <strlen($password); $i++){ $encoded.="{$password{$i}}\000"; }
return $encoded;
}
with this:
public function encodePassword($password)
{
$encoded = mb_convert_encoding('"' . $password . '"', 'utf-16le', 'utf-8');
return $encoded;
}
this worked for me.
have a nice day, johannes