From 4ced6407c6f53b8053a626c444c58109d431fae7 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 6 Jul 2019 11:42:19 +0200 Subject: [PATCH] fix package install was generating md5 hased passwords for header --- setup/inc/class.setup_cmd_header.inc.php | 7 +++---- setup/inc/class.setup_header.inc.php | 6 ++++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/setup/inc/class.setup_cmd_header.inc.php b/setup/inc/class.setup_cmd_header.inc.php index 67f9c194b4..9e35faf62d 100644 --- a/setup/inc/class.setup_cmd_header.inc.php +++ b/setup/inc/class.setup_cmd_header.inc.php @@ -1,13 +1,12 @@ * @package setup - * @copyright (c) 2007-16 by Ralf Becker + * @copyright (c) 2007-19 by Ralf Becker * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License - * @version $Id$ */ use EGroupware\Api; @@ -366,6 +365,6 @@ class setup_cmd_header extends setup_cmd { $var =& $var[$name]; } - if (true) $var = strpos($name,'passw') !== false ? md5($value) : $value; + if (true) $var = $value; } } diff --git a/setup/inc/class.setup_header.inc.php b/setup/inc/class.setup_header.inc.php index 21a6344c74..2f32527481 100644 --- a/setup/inc/class.setup_header.inc.php +++ b/setup/inc/class.setup_header.inc.php @@ -8,7 +8,6 @@ * @author Miles Lott * @author Tony Puglisi (Angles) * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License - * @version $Id$ */ use EGroupware\Api; @@ -212,7 +211,10 @@ class setup_header $var = Array(); foreach($egw_info['server'] as $name => $value) { - if ($name == 'header_admin_password' && $value && !self::is_hashed($value)) $value = Api\Auth::encrypt_sql($value, $most_secure_pw_hash); + if ($name == 'header_admin_password' && $value && !self::is_hashed($value)) + { + $value = Api\Auth::encrypt_sql($value, $most_secure_pw_hash); + } if ($name == 'versions') { $name = 'mcrypt_version';