1 |
jcrisp |
1.1 |
diff -Nrbu phpldapadmin-1.2.3/lib/PageRender.php phpldapadmin-1.2.3-OK/lib/PageRender.php |
2 |
|
|
--- phpldapadmin-1.2.3/lib/PageRender.php 2012-10-01 10:54:14.000000000 +0400 |
3 |
|
|
+++ phpldapadmin-1.2.3-OK/lib/PageRender.php 2013-11-12 03:44:40.518144839 +0400 |
4 |
|
|
@@ -287,7 +287,7 @@ |
5 |
|
|
break; |
6 |
|
|
|
7 |
|
|
default: |
8 |
|
|
- $vals[$i] = password_hash($passwordvalue,$enc); |
9 |
|
|
+ $vals[$i] = pla_password_hash($passwordvalue,$enc); |
10 |
|
|
} |
11 |
|
|
|
12 |
|
|
$vals = array_unique($vals); |
13 |
|
|
diff -Nrbu phpldapadmin-1.2.3/lib/ds_ldap.php phpldapadmin-1.2.3-OK/lib/ds_ldap.php |
14 |
|
|
--- phpldapadmin-1.2.3/lib/ds_ldap.php 2012-10-01 10:54:14.000000000 +0400 |
15 |
|
|
+++ phpldapadmin-1.2.3-OK/lib/ds_ldap.php 2013-11-12 03:40:56.638343739 +0400 |
16 |
|
|
@@ -1117,12 +1117,14 @@ |
17 |
|
|
if (is_array($dn)) { |
18 |
|
|
$a = array(); |
19 |
|
|
foreach ($dn as $key => $rdn) |
20 |
|
|
- $a[$key] = preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$rdn); |
21 |
|
|
+ $a[$key] = preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', |
22 |
|
|
+ function ($matches) { return chr(hexdec($matches[1])); }, $rdn); |
23 |
|
|
|
24 |
|
|
return $a; |
25 |
|
|
|
26 |
|
|
} else |
27 |
|
|
- return preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$dn); |
28 |
|
|
+ return preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', |
29 |
|
|
+ function ($matches) { return chr(hexdec($matches[1])); }, $dn); |
30 |
|
|
} |
31 |
|
|
|
32 |
|
|
public function getRootDSE($method=null) { |
33 |
|
|
diff -Nrbu phpldapadmin-1.2.3/lib/functions.php phpldapadmin-1.2.3-OK/lib/functions.php |
34 |
|
|
--- phpldapadmin-1.2.3/lib/functions.php 2012-10-01 10:54:14.000000000 +0400 |
35 |
|
|
+++ phpldapadmin-1.2.3-OK/lib/functions.php 2013-11-12 03:44:17.298065264 +0400 |
36 |
|
|
@@ -2127,7 +2127,7 @@ |
37 |
|
|
* crypt, ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, sha512, or clear. |
38 |
|
|
* @return string The hashed password. |
39 |
|
|
*/ |
40 |
|
|
-function password_hash($password_clear,$enc_type) { |
41 |
|
|
+function pla_password_hash($password_clear,$enc_type) { |
42 |
|
|
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS')) |
43 |
|
|
debug_log('Entered (%%)',1,0,__FILE__,__LINE__,__METHOD__,$fargs); |
44 |
|
|
|
45 |
|
|
@@ -2318,7 +2318,7 @@ |
46 |
|
|
|
47 |
|
|
# SHA crypted passwords |
48 |
|
|
case 'sha': |
49 |
|
|
- if (strcasecmp(password_hash($plainpassword,'sha'),'{SHA}'.$cryptedpassword) == 0) |
50 |
|
|
+ if (strcasecmp(pla_password_hash($plainpassword,'sha'),'{SHA}'.$cryptedpassword) == 0) |
51 |
|
|
return true; |
52 |
|
|
else |
53 |
|
|
return false; |
54 |
|
|
@@ -2327,7 +2327,7 @@ |
55 |
|
|
|
56 |
|
|
# MD5 crypted passwords |
57 |
|
|
case 'md5': |
58 |
|
|
- if( strcasecmp(password_hash($plainpassword,'md5'),'{MD5}'.$cryptedpassword) == 0) |
59 |
|
|
+ if( strcasecmp(pla_password_hash($plainpassword,'md5'),'{MD5}'.$cryptedpassword) == 0) |
60 |
|
|
return true; |
61 |
|
|
else |
62 |
|
|
return false; |
63 |
|
|
@@ -2392,7 +2392,7 @@ |
64 |
|
|
|
65 |
|
|
# SHA512 crypted passwords |
66 |
|
|
case 'sha512': |
67 |
|
|
- if (strcasecmp(password_hash($plainpassword,'sha512'),'{SHA512}'.$cryptedpassword) == 0) |
68 |
|
|
+ if (strcasecmp(pla_password_hash($plainpassword,'sha512'),'{SHA512}'.$cryptedpassword) == 0) |
69 |
|
|
return true; |
70 |
|
|
else |
71 |
|
|
return false; |
72 |
|
|
@@ -2565,12 +2565,14 @@ |
73 |
|
|
$a = array(); |
74 |
|
|
|
75 |
|
|
foreach ($dn as $key => $rdn) |
76 |
|
|
- $a[$key] = preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$rdn); |
77 |
|
|
+ $a[$key] = preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', |
78 |
|
|
+ function ($matches) { return chr(hexdec($matches[1])); }, $rdn ); |
79 |
|
|
|
80 |
|
|
return $a; |
81 |
|
|
|
82 |
|
|
} else { |
83 |
|
|
- return preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$dn); |
84 |
|
|
+ return preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', |
85 |
|
|
+ function ($matches) { return chr(hexdec($matches[1])); }, $dn); |
86 |
|
|
} |
87 |
|
|
} |
88 |
|
|
|