Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
server:php:applications
phpldapadmin
password_hash.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File password_hash.patch of Package phpldapadmin
diff -aur a/lib/ds_ldap.php b/lib/ds_ldap.php --- a/lib/ds_ldap.php 2012-10-01 08:54:14.000000000 +0200 +++ b/lib/ds_ldap.php 2016-09-04 18:08:20.107279678 +0200 @@ -1117,12 +1117,12 @@ if (is_array($dn)) { $a = array(); foreach ($dn as $key => $rdn) - $a[$key] = preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$rdn); + $a[$key] = preg_replace_callback('/\\\([0-9A-Fa-f]{2})/',function($m){return ''.chr(hexdec($m[1])).'';},$rdn); return $a; } else - return preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$dn); + return preg_replace_callback('/\\\([0-9A-Fa-f]{2})/',function($f){return ''.chr(hexdec($m[1])).'';},$dn); } public function getRootDSE($method=null) { diff -aur a/lib/functions.php b/lib/functions.php --- a/lib/functions.php 2012-10-01 08:54:14.000000000 +0200 +++ b/lib/functions.php 2016-09-04 18:06:45.556118085 +0200 @@ -2127,7 +2127,7 @@ * crypt, ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, sha512, or clear. * @return string The hashed password. */ -function password_hash($password_clear,$enc_type) { +function x_password_hash($password_clear,$enc_type) { if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS')) debug_log('Entered (%%)',1,0,__FILE__,__LINE__,__METHOD__,$fargs); @@ -2318,7 +2318,7 @@ # SHA crypted passwords case 'sha': - if (strcasecmp(password_hash($plainpassword,'sha'),'{SHA}'.$cryptedpassword) == 0) + if (strcasecmp(x_password_hash($plainpassword,'sha'),'{SHA}'.$cryptedpassword) == 0) return true; else return false; @@ -2327,7 +2327,7 @@ # MD5 crypted passwords case 'md5': - if( strcasecmp(password_hash($plainpassword,'md5'),'{MD5}'.$cryptedpassword) == 0) + if( strcasecmp(x_password_hash($plainpassword,'md5'),'{MD5}'.$cryptedpassword) == 0) return true; else return false; @@ -2392,7 +2392,7 @@ # SHA512 crypted passwords case 'sha512': - if (strcasecmp(password_hash($plainpassword,'sha512'),'{SHA512}'.$cryptedpassword) == 0) + if (strcasecmp(x_password_hash($plainpassword,'sha512'),'{SHA512}'.$cryptedpassword) == 0) return true; else return false; @@ -2565,12 +2565,12 @@ $a = array(); foreach ($dn as $key => $rdn) - $a[$key] = preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$rdn); + $a[$key] = preg_replace_callback('/\\\([0-9A-Fa-f]{2})/',function($m){return ''.chr(hexdec($m[1])).'';},$rdn); return $a; } else { - return preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$dn); + return preg_replace_callback('/\\\([0-9A-Fa-f]{2})/',function($m){return ''.chr(hexdec($m[1])).'';},$dn); } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor