Index: head/net/phpldapadmin/Makefile =================================================================== --- head/net/phpldapadmin/Makefile (revision 466258) +++ head/net/phpldapadmin/Makefile (revision 466259) @@ -1,57 +1,55 @@ # Created by: Matthew Seaman # $FreeBSD$ PORTNAME= phpldapadmin PORTVERSION= 1.2.3 -PORTREVISION= 7 +PORTREVISION= 8 PORTEPOCH= 1 CATEGORIES= net www MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-php5/${PORTVERSION} MAINTAINER= matthew@FreeBSD.org COMMENT= PHP application to administer LDAP over the web LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE -USES= cpe tar:tgz +USES= cpe php:web tar:tgz CPE_VENDOR= deon_george NO_ARCH= yes NO_BUILD= yes USE_PHP= gettext ldap openssl pcre session xml iconv hash - -WANT_PHP_WEB= yes GROUPS?= ${WWWGRP} CFGDIR= config CFGFILE= config.php PLIST= ${WRKDIR}/plist PLIST_SUB+= PLA_GRP=${GROUPS} SUB_LIST+= PKGNAME=${PKGNAME} SUB_FILES+= pkg-message .SILENT: post-patch: cd ${WRKSRC} ; \ ${FIND} . ! -type d ! -name ${CFGFILE}.example ! -name .cvsignore \ ! -name .gitignore ! -name *.orig | ${SORT} | \ ${SED} -e "s!^\.!%%WWWDIR%%!" >${PLIST} ; \ ${CAT} ${PKGDIR}/pkg-plist-chunk >>${PLIST} do-install: cd ${WRKSRC} ; \ for src in $$( ${FIND} . ! -name .cvsignore \ ! -name .gitignore ! -name *.orig ) ; do \ dst=${STAGEDIR}${WWWDIR}$${src#.} ; \ if ${TEST} -d $$src ; then \ ${MKDIR} $$dst ; \ else \ ${INSTALL_DATA} $$src $$dst ; \ fi \ done .include Index: head/net/phpldapadmin/files/patch-config__config.php.example =================================================================== --- head/net/phpldapadmin/files/patch-config__config.php.example (revision 466258) +++ head/net/phpldapadmin/files/patch-config__config.php.example (revision 466259) @@ -1,20 +1,20 @@ ---- ./config/config.php.example.orig 2014-05-03 08:00:05.933577117 +0100 -+++ ./config/config.php.example 2014-05-03 08:00:38.259564444 +0100 -@@ -379,7 +379,7 @@ +--- config/config.php.example.orig 2012-10-01 06:54:14 UTC ++++ config/config.php.example +@@ -379,7 +379,7 @@ $servers->setValue('server','name','My L /* Default password hashing algorithm. One of md5, ssha, sha, md5crpyt, smd5, blowfish, crypt or leave blank for now default algorithm. */ -// $servers->setValue('appearance','password_hash','md5'); +// $servers->setValue('appearance','password_hash_custom','md5'); /* If you specified 'cookie' or 'session' as the auth_type above, you can optionally specify here an attribute to use when logging in. If you enter -@@ -546,7 +546,7 @@ +@@ -546,7 +546,7 @@ $servers->setValue('sasl','authz_id_rege $servers->setValue('sasl','authz_id_replacement','$1'); $servers->setValue('sasl','props',null); -$servers->setValue('appearance','password_hash','md5'); +$servers->setValue('appearance','password_hash_custom','md5'); $servers->setValue('login','attr','dn'); $servers->setValue('login','fallback_dn',false); $servers->setValue('login','class',null); Index: head/net/phpldapadmin/files/patch-lib__PageRender.php =================================================================== --- head/net/phpldapadmin/files/patch-lib__PageRender.php (revision 466258) +++ head/net/phpldapadmin/files/patch-lib__PageRender.php (revision 466259) @@ -1,29 +1,29 @@ ---- ./lib/PageRender.php.orig 2012-10-01 07:54:14.000000000 +0100 -+++ ./lib/PageRender.php 2014-05-03 07:57:44.744575309 +0100 -@@ -287,7 +287,7 @@ +--- lib/PageRender.php.orig 2012-10-01 06:54:14 UTC ++++ lib/PageRender.php +@@ -287,7 +287,7 @@ class PageRender extends Visitor { break; default: - $vals[$i] = password_hash($passwordvalue,$enc); + $vals[$i] = password_hash_custom($passwordvalue,$enc); } $vals = array_unique($vals); -@@ -957,7 +957,7 @@ +@@ -957,7 +957,7 @@ class PageRender extends Visitor { if (trim($val)) $enc_type = get_enc_type($val); else - $enc_type = $server->getValue('appearance','password_hash'); + $enc_type = $server->getValue('appearance','password_hash_custom'); $obfuscate_password = obfuscate_password_display($enc_type); -@@ -982,7 +982,7 @@ +@@ -982,7 +982,7 @@ class PageRender extends Visitor { if (trim($val)) $enc_type = get_enc_type($val); else - $enc_type = $server->getValue('appearance','password_hash'); + $enc_type = $server->getValue('appearance','password_hash_custom'); echo '
'; Index: head/net/phpldapadmin/files/patch-lib__TemplateRender.php =================================================================== --- head/net/phpldapadmin/files/patch-lib__TemplateRender.php (revision 466258) +++ head/net/phpldapadmin/files/patch-lib__TemplateRender.php (revision 466259) @@ -1,11 +1,11 @@ ---- ./lib/TemplateRender.php.orig 2014-05-03 07:58:18.076584893 +0100 -+++ ./lib/TemplateRender.php 2014-05-03 07:59:18.859574787 +0100 -@@ -2466,7 +2466,7 @@ +--- lib/TemplateRender.php.orig 2012-10-01 06:54:14 UTC ++++ lib/TemplateRender.php +@@ -2466,7 +2466,7 @@ function deleteAttribute(attrName,friend if ($val = $attribute->getValue($i)) $default = get_enc_type($val); else - $default = $this->getServer()->getValue('appearance','password_hash'); + $default = $this->getServer()->getValue('appearance','password_hash_custom'); if (! $attribute->getPostValue()) printf('',$attribute->getName(),$i); Index: head/net/phpldapadmin/files/patch-lib__ds_ldap.php =================================================================== --- head/net/phpldapadmin/files/patch-lib__ds_ldap.php (revision 466258) +++ head/net/phpldapadmin/files/patch-lib__ds_ldap.php (revision 466259) @@ -1,30 +1,30 @@ ---- ./lib/ds_ldap.php.orig 2012-10-01 07:54:14.000000000 +0100 -+++ ./lib/ds_ldap.php 2014-05-03 07:57:44.746572911 +0100 -@@ -1116,13 +1116,24 @@ +--- lib/ds_ldap.php.orig 2012-10-01 06:54:14 UTC ++++ lib/ds_ldap.php +@@ -1116,13 +1116,24 @@ class ldap extends DS { 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('\\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('\\1')).''; + }, + $dn + ); } public function getRootDSE($method=null) { Index: head/net/phpldapadmin/files/patch-lib__ds_ldap_pla.php =================================================================== --- head/net/phpldapadmin/files/patch-lib__ds_ldap_pla.php (revision 466258) +++ head/net/phpldapadmin/files/patch-lib__ds_ldap_pla.php (revision 466259) @@ -1,11 +1,11 @@ ---- ./lib/ds_ldap_pla.php.orig 2012-10-01 07:54:14.000000000 +0100 -+++ ./lib/ds_ldap_pla.php 2014-05-03 07:57:44.748572937 +0100 -@@ -16,7 +16,7 @@ +--- lib/ds_ldap_pla.php.orig 2012-10-01 06:54:14 UTC ++++ lib/ds_ldap_pla.php +@@ -16,7 +16,7 @@ class ldap_pla extends ldap { function __construct($index) { parent::__construct($index); - $this->default->appearance['password_hash'] = array( + $this->default->appearance['password_hash_custom'] = array( 'desc'=>'Default HASH to use for passwords', 'default'=>'md5'); Index: head/net/phpldapadmin/files/patch-lib__functions.php =================================================================== --- head/net/phpldapadmin/files/patch-lib__functions.php (revision 466258) +++ head/net/phpldapadmin/files/patch-lib__functions.php (revision 466259) @@ -1,66 +1,98 @@ ---- ./lib/functions.php.orig 2012-10-01 07:54:14.000000000 +0100 -+++ ./lib/functions.php 2014-05-03 07:57:44.751570981 +0100 -@@ -2127,7 +2127,7 @@ +--- lib/functions.php.orig 2012-10-01 06:54:14 UTC ++++ lib/functions.php +@@ -745,6 +745,7 @@ function blowfish_encrypt($data,$secret= + if (! trim($secret)) + return $data; + ++/* + if (function_exists('mcrypt_module_open') && ! empty($data)) { + $td = mcrypt_module_open(MCRYPT_BLOWFISH,'',MCRYPT_MODE_ECB,''); + $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td),MCRYPT_DEV_URANDOM); +@@ -754,6 +755,7 @@ function blowfish_encrypt($data,$secret= + + return $encrypted_data; + } ++*/ + + if (file_exists(LIBDIR.'blowfish.php')) + require_once LIBDIR.'blowfish.php'; +@@ -801,6 +803,7 @@ function blowfish_decrypt($encdata,$secr + if (! trim($secret)) + return $encdata; + ++/* + if (function_exists('mcrypt_module_open') && ! empty($encdata)) { + $td = mcrypt_module_open(MCRYPT_BLOWFISH,'',MCRYPT_MODE_ECB,''); + $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td),MCRYPT_DEV_URANDOM); +@@ -810,6 +813,7 @@ function blowfish_decrypt($encdata,$secr + + return $decrypted_data; + } ++*/ + + if (file_exists(LIBDIR.'blowfish.php')) + require_once LIBDIR.'blowfish.php'; +@@ -2127,7 +2131,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 password_hash_custom($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 @@ +@@ -2318,7 +2322,7 @@ function password_check($cryptedpassword # SHA crypted passwords case 'sha': - if (strcasecmp(password_hash($plainpassword,'sha'),'{SHA}'.$cryptedpassword) == 0) + if (strcasecmp(password_hash_custom($plainpassword,'sha'),'{SHA}'.$cryptedpassword) == 0) return true; else return false; -@@ -2327,7 +2327,7 @@ +@@ -2327,7 +2331,7 @@ function password_check($cryptedpassword # MD5 crypted passwords case 'md5': - if( strcasecmp(password_hash($plainpassword,'md5'),'{MD5}'.$cryptedpassword) == 0) + if( strcasecmp(password_hash_custom($plainpassword,'md5'),'{MD5}'.$cryptedpassword) == 0) return true; else return false; -@@ -2392,7 +2392,7 @@ +@@ -2392,7 +2396,7 @@ function password_check($cryptedpassword # SHA512 crypted passwords case 'sha512': - if (strcasecmp(password_hash($plainpassword,'sha512'),'{SHA512}'.$cryptedpassword) == 0) + if (strcasecmp(password_hash_custom($plainpassword,'sha512'),'{SHA512}'.$cryptedpassword) == 0) return true; else return false; -@@ -2564,13 +2564,24 @@ +@@ -2564,13 +2568,24 @@ function dn_unescape($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('\\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('\\1')).''; + }, + $dn + ); } } Index: head/net/phpldapadmin/files/patch-tools__po__Makefile =================================================================== --- head/net/phpldapadmin/files/patch-tools__po__Makefile (revision 466258) +++ head/net/phpldapadmin/files/patch-tools__po__Makefile (revision 466259) @@ -1,7 +1,7 @@ ---- ./tools/po/Makefile.orig 2012-10-01 07:54:14.000000000 +0100 -+++ ./tools/po/Makefile 2014-05-03 07:57:44.752575636 +0100 +--- tools/po/Makefile.orig 2012-10-01 06:54:14 UTC ++++ tools/po/Makefile @@ -1,4 +1,3 @@ -#!/bin/bash # # Makefile Utility to manipulate PO and POT files # Copyright (c) 2009 Alessandro De Zorzi -