Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 482340 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-8 / +30 lines)
Line  Link Here
0
-- a/lib/functions.php
0
++ b/lib/functions.php
Lines 2564-2576 Link Here
2564
	if (is_array($dn)) {
2564
	if (is_array($dn)) {
2565
		$a = array();
2565
		$a = array();
2566
2566
2567
		foreach ($dn as $key => $rdn)
2567
		foreach ($dn as $key => $rdn) {
2568
			$a[$key] = preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$rdn);
2568
			$a[$key] = preg_replace_callback('/\\\([0-9A-Fa-f]{2})/',
2569
				function ($m) {
2570
					return ''.chr(hexdec('\\1')).'';
2571
				},
2572
				$rdn
2573
			);
2574
		}
2569
2575
2570
		return $a;
2576
		return $a;
2571
2577
2572
	} else {
2578
	} else {
2573
		return preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$dn);
2579
		 return  preg_replace_callback('/\\\([0-9A-Fa-f]{2})/',
2580
			 function ($m) {
2581
				return ''.chr(hexdec('\\1')).'';
2582
			},
2583
			$dn
2584
		);
2574
	}
2585
	}
2575
}
2586
}
2576
-- a/lib/ds_ldap.php
2587
++ b/lib/ds_ldap.php
Lines 1116-1128 Link Here
1116
1116
1117
		if (is_array($dn)) {
1117
		if (is_array($dn)) {
1118
			$a = array();
1118
			$a = array();
1119
			foreach ($dn as $key => $rdn)
1119
			foreach ($dn as $key => $rdn) {
1120
				$a[$key] = preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$rdn);
1120
				$a[$key] = preg_replace_callback('/\\\([0-9A-Fa-f]{2})/',
1121
					function ($m) {
1122
						return ''.chr(hexdec('\\1')).'';
1123
					},
1124
					$rdn
1125
					);
1126
			}
1121
1127
1122
			return $a;
1128
			return $a;
1123
1129
1124
		} else
1130
		} else
1125
			return preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$dn);
1131
			 return preg_replace_callback('/\\\([0-9A-Fa-f]{2})/',
1132
				function ($m) {
1133
					return ''.chr(hexdec('\\1')).'';
1134
				},
1135
				$dn
1136
			);
1126
	}
1137
	}
1127
1138
1128
	public function getRootDSE($method=null) {
1139
	public function getRootDSE($method=null) {

Return to bug 482340