aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/phpldapadmin/APKBUILD21
-rw-r--r--main/phpldapadmin/phpldapadmin-1.2.3_changed-password_hash-to-pla_password_hash.patch49
-rw-r--r--main/phpldapadmin/phpldapadmin-1.2.3_changed-preg_replace-to-preg_replace-callback.patch38
-rw-r--r--main/phpldapadmin/phpldapadmin-1.2.3_use-preg_replace_callback.patch34
4 files changed, 137 insertions, 5 deletions
diff --git a/main/phpldapadmin/APKBUILD b/main/phpldapadmin/APKBUILD
index 448098f830..1e8e08ecf4 100644
--- a/main/phpldapadmin/APKBUILD
+++ b/main/phpldapadmin/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=phpldapadmin
pkgver=1.2.3
-pkgrel=1
+pkgrel=2
pkgdesc="Web front-end for managing OpenLDAP"
url="http://phpldapadmin.sourceforge.net"
arch="noarch"
@@ -14,9 +14,11 @@ subpackages=
source="http://downloads.sourceforge.net/project/$pkgname/$pkgname-php5/$pkgver/$pkgname-$pkgver.tgz
$pkgname.additional-template
phpldapadmin-1.2.3-force-ssha512.patch
+ phpldapadmin-1.2.3_changed-password_hash-to-pla_password_hash.patch
+ phpldapadmin-1.2.3_changed-preg_replace-to-preg_replace-callback.patch
+ phpldapadmin-1.2.3_use-preg_replace_callback.patch
"
-
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
@@ -52,10 +54,19 @@ package() {
md5sums="59a49054039ceb852c2da377d8742360 phpldapadmin-1.2.3.tgz
3ca4fbf9e16f192b441b51b2d25ecf14 phpldapadmin.additional-template
-34e36e414f59c6ed4946efa1f277f962 phpldapadmin-1.2.3-force-ssha512.patch"
+34e36e414f59c6ed4946efa1f277f962 phpldapadmin-1.2.3-force-ssha512.patch
+ac802d139e867ecae7e64923ced54741 phpldapadmin-1.2.3_changed-password_hash-to-pla_password_hash.patch
+231b82f76e2d2359fa3f98079571830b phpldapadmin-1.2.3_changed-preg_replace-to-preg_replace-callback.patch
+445cf7143613f48918972bc9a5fab06f phpldapadmin-1.2.3_use-preg_replace_callback.patch"
sha256sums="aecaf8c3ce77ba3899dd31ee5ee183555b2f9349eb8e196dcd33d8a3c485ed58 phpldapadmin-1.2.3.tgz
85e931a84f3fd5e398da24403425b58711c48196ed9692f7a312883a0ed9fae0 phpldapadmin.additional-template
-0cd1d8195ecdc53cde9667bf256d2243d67675ac92547d163a707659df5a3d9a phpldapadmin-1.2.3-force-ssha512.patch"
+0cd1d8195ecdc53cde9667bf256d2243d67675ac92547d163a707659df5a3d9a phpldapadmin-1.2.3-force-ssha512.patch
+a5befd05b3332ba37b8778df1505b370c3c84c1494ce9184f3f2ea4cbe99235b phpldapadmin-1.2.3_changed-password_hash-to-pla_password_hash.patch
+375571b4471cd39173d16bf54417f8ba2b8c66103d652b4a2ab1eaa9e36b8046 phpldapadmin-1.2.3_changed-preg_replace-to-preg_replace-callback.patch
+a9ad83216edde85f5c44514cf152b3532766f6981e17da6b00c7c267b28dd89b phpldapadmin-1.2.3_use-preg_replace_callback.patch"
sha512sums="58a57ca577586685ebd0d7fde7e299b8945d1693018c7803e19239b79f4b9d72a4d207d53c9f284268e32398108038efafcdb434e634619bfe87db3524d267b6 phpldapadmin-1.2.3.tgz
913cc89bfba3a24064865f091a3bcc6ec88db0824d750e8b3b1f6497b5ac1a1e158ced895f1f85f93607402e9353798b3dd4ccdbb1454713f96937c884456eb7 phpldapadmin.additional-template
-aecbf3699af4ae39426c6c81edd45a738cdd91f9cfc1e8062ade4b6fa11e7530a8d8b4c2730cd648749b87381dbcca1bbe8681b8e45ec7af50b6b74137f89331 phpldapadmin-1.2.3-force-ssha512.patch"
+aecbf3699af4ae39426c6c81edd45a738cdd91f9cfc1e8062ade4b6fa11e7530a8d8b4c2730cd648749b87381dbcca1bbe8681b8e45ec7af50b6b74137f89331 phpldapadmin-1.2.3-force-ssha512.patch
+71a0bc987e526401c72b77b36843868099040654c3435e9c2f5b266a49a27b75b007fd949e9981bcd4b9a678f0edd74e988e66647984c882c57fe8dc99a26849 phpldapadmin-1.2.3_changed-password_hash-to-pla_password_hash.patch
+0524112c7a3c591eaf4b3e64de26282a786a2c0fa73f1047084f14c4f9093cf31e1b9a36b7b1736d6c6ae89f9940916d42cbbab7081249abf1a963de588aac63 phpldapadmin-1.2.3_changed-preg_replace-to-preg_replace-callback.patch
+57e1d8d861f84f0934a2275d7ba37621c2c19c71bf2c04db918ccbc6df36eaca60986db2ba6b543356ad55eab8d7850267db1d30677d77c96238821c29b99ac9 phpldapadmin-1.2.3_use-preg_replace_callback.patch"
diff --git a/main/phpldapadmin/phpldapadmin-1.2.3_changed-password_hash-to-pla_password_hash.patch b/main/phpldapadmin/phpldapadmin-1.2.3_changed-password_hash-to-pla_password_hash.patch
new file mode 100644
index 0000000000..1408c13184
--- /dev/null
+++ b/main/phpldapadmin/phpldapadmin-1.2.3_changed-password_hash-to-pla_password_hash.patch
@@ -0,0 +1,49 @@
+From e673df3ba8d690afbbba28f9ec368e475933efe8 Mon Sep 17 00:00:00 2001
+From: Mohamad Elrashidin Bin Sajeli <archayl@gmail.com>
+Date: Thu, 8 May 2014 20:22:30 +0800
+Subject: [PATCH] Changed password_hash to pla_password_hash
+
+---
+ lib/functions.php | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/lib/functions.php b/lib/functions.php
+index 56d8bf3..ad9ee9f 100644
+--- a/lib/functions.php
++++ b/lib/functions.php
+@@ -2127,7 +2127,7 @@ function password_types() {
+ * 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 pla_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 @@ function password_check($cryptedpassword,$plainpassword,$attribute='userpassword
+
+ # SHA crypted passwords
+ case 'sha':
+- if (strcasecmp(password_hash($plainpassword,'sha'),'{SHA}'.$cryptedpassword) == 0)
++ if (strcasecmp(pla_password_hash($plainpassword,'sha'),'{SHA}'.$cryptedpassword) == 0)
+ return true;
+ else
+ return false;
+@@ -2327,7 +2327,7 @@ function password_check($cryptedpassword,$plainpassword,$attribute='userpassword
+
+ # MD5 crypted passwords
+ case 'md5':
+- if( strcasecmp(password_hash($plainpassword,'md5'),'{MD5}'.$cryptedpassword) == 0)
++ if( strcasecmp(pla_password_hash($plainpassword,'md5'),'{MD5}'.$cryptedpassword) == 0)
+ return true;
+ else
+ return false;
+@@ -2392,7 +2392,7 @@ function password_check($cryptedpassword,$plainpassword,$attribute='userpassword
+
+ # SHA512 crypted passwords
+ case 'sha512':
+- if (strcasecmp(password_hash($plainpassword,'sha512'),'{SHA512}'.$cryptedpassword) == 0)
++ if (strcasecmp(pla_password_hash($plainpassword,'sha512'),'{SHA512}'.$cryptedpassword) == 0)
+ return true;
+ else
+ return false;
diff --git a/main/phpldapadmin/phpldapadmin-1.2.3_changed-preg_replace-to-preg_replace-callback.patch b/main/phpldapadmin/phpldapadmin-1.2.3_changed-preg_replace-to-preg_replace-callback.patch
new file mode 100644
index 0000000000..d2fa12a477
--- /dev/null
+++ b/main/phpldapadmin/phpldapadmin-1.2.3_changed-preg_replace-to-preg_replace-callback.patch
@@ -0,0 +1,38 @@
+From b082cf1742b2310d69b2f278f33f6025e2544acb Mon Sep 17 00:00:00 2001
+From: Mohamad Elrashidin Bin Sajeli <archayl@gmail.com>
+Date: Thu, 8 May 2014 20:40:57 +0800
+Subject: [PATCH] Changed preg_replace to preg_replace callback
+
+---
+ lib/functions.php | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/lib/functions.php b/lib/functions.php
+index ad9ee9f..d31e0c1 100644
+--- a/lib/functions.php
++++ b/lib/functions.php
+@@ -2565,12 +2565,22 @@ function dn_unescape($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 ($r) {
++ return "''.chr(hexdec('$r[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 ($r) {
++ return "''.chr(hexdec('$r[1]')).''";
++ },
++ $dn
++ );
+ }
+ }
+
diff --git a/main/phpldapadmin/phpldapadmin-1.2.3_use-preg_replace_callback.patch b/main/phpldapadmin/phpldapadmin-1.2.3_use-preg_replace_callback.patch
new file mode 100644
index 0000000000..60c086d197
--- /dev/null
+++ b/main/phpldapadmin/phpldapadmin-1.2.3_use-preg_replace_callback.patch
@@ -0,0 +1,34 @@
+From 5a7edc892f1b3cccab74ed150f9d6843912a39ee Mon Sep 17 00:00:00 2001
+From: Ben Chavet <ben@chavet.net>
+Date: Thu, 29 May 2014 18:57:44 +0000
+Subject: [PATCH] Use preg_replace_callback instead of /e in preg_replace to
+ fix E_DEPRECATED warnings
+
+---
+ lib/ds_ldap.php | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/lib/ds_ldap.php b/lib/ds_ldap.php
+index c346660..8bc1ef8 100644
+--- a/lib/ds_ldap.php
++++ b/lib/ds_ldap.php
+@@ -1116,13 +1116,14 @@ private function unescapeDN($dn) {
+
+ 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);
+-
++ foreach ($dn as $key => $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);
++ } else {
++ return preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', function($m) { return "''.chr(hexdec('${m[1]}')).''"; }, $dn);
++ }
+ }
+
+ public function getRootDSE($method=null) {