* CalDAV/CardDAV/WebDAV: get authentication working again with PHP 5.2

This commit is contained in:
Ralf Becker
2013-07-30 16:49:17 +00:00
parent faedd7a01c
commit f535947163

View File

@ -101,9 +101,8 @@ class egw_digest_auth
// replace \x encoded non-ascii chars in password, as they are used eg. by Thunderbird for German umlauts
if (strpos($password, '\\x') !== false)
{
$password = preg_replace_callback('/\\\\x([0-9A-F]{2})/i', function($matches){
return chr(hexdec($matches[1]));
}, $password);
$password = preg_replace_callback('/\\\\x([0-9A-F]{2})/i',
create_function('$matches', 'return chr(hexdec($matches[1]));'), $password);
}
// try translating the password from iso-8859-1 to utf-8
$password = translation::convert($password, 'iso-8859-1');