From f8906302f6abe559b4e461af237d6aefa4407457 Mon Sep 17 00:00:00 2001 From: Matthew Seaman Date: Mon, 2 Apr 2018 20:11:58 +0000 Subject: Modernization: switch to USES=php:web Update files/patch-lib__functions.php to work around the lack of the deprecated mcrypt functions in php >= 7.1. Regenerate patches with 'make makesum' PR: 227199 Submitted by: ohartmann@walstatt.org --- net/phpldapadmin/files/patch-lib__functions.php | 46 +++++++++++++++++++++---- 1 file changed, 39 insertions(+), 7 deletions(-) (limited to 'net/phpldapadmin/files/patch-lib__functions.php') diff --git a/net/phpldapadmin/files/patch-lib__functions.php b/net/phpldapadmin/files/patch-lib__functions.php index bf7572fa379b..2b607e86f827 100644 --- a/net/phpldapadmin/files/patch-lib__functions.php +++ b/net/phpldapadmin/files/patch-lib__functions.php @@ -1,6 +1,38 @@ ---- ./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. */ @@ -9,7 +41,7 @@ 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': @@ -18,7 +50,7 @@ return true; else return false; -@@ -2327,7 +2327,7 @@ +@@ -2327,7 +2331,7 @@ function password_check($cryptedpassword # MD5 crypted passwords case 'md5': @@ -27,7 +59,7 @@ return true; else return false; -@@ -2392,7 +2392,7 @@ +@@ -2392,7 +2396,7 @@ function password_check($cryptedpassword # SHA512 crypted passwords case 'sha512': @@ -36,7 +68,7 @@ return true; else return false; -@@ -2564,13 +2564,24 @@ +@@ -2564,13 +2568,24 @@ function dn_unescape($dn) { if (is_array($dn)) { $a = array(); -- cgit v1.2.3