Hello community, here is the log from the commit of package horde checked in at Wed Mar 29 16:50:01 CEST 2006. -------- --- horde/horde.changes 2006-03-27 15:07:41.000000000 +0200 +++ horde/horde.changes 2006-03-29 15:00:17.000000000 +0200 @@ -1,0 +2,6 @@ +Wed Mar 29 15:07:49 CEST 2006 - mmarek@suse.cz + +- fix insecure eval() calls (backport from 3.0.10 release) + [#161768] (eval.patch) + +------------------------------------------------------------------- New: ---- horde-3.0.9-eval.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ horde.spec ++++++ --- /var/tmp/diff_new_pack.7FS8h7/_old 2006-03-29 16:49:24.000000000 +0200 +++ /var/tmp/diff_new_pack.7FS8h7/_new 2006-03-29 16:49:24.000000000 +0200 @@ -17,10 +17,11 @@ Autoreqprov: on Requires: mod_php_any php-gettext php-mcrypt php-imap php-pear php-pear-log php-session php-dom php php5-pear-auth_sasl php5-pear-date php5-pear-db php5-pear-file php5-pear-mail php5-pear-mail_mime Version: 3.0.9 -Release: 9 +Release: 10 Source0: %{name}-%{version}.tar.bz2 Source2: README.SuSE Patch1: %{name}-%{version}-log.patch +Patch2: %{name}-%{version}-eval.patch URL: http://www.horde.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -44,6 +45,7 @@ %prep %setup -q %patch1 +%patch2 grep -ErZl '/usr/(local/)?bin/php' . | \ xargs -0 sed -ri 's@/usr/(local/)?bin/php@/usr/bin/php5@' cp -a %{S:2} . @@ -84,6 +86,9 @@ %attr(0750, wwwrun, www) %dir /var/log/horde %changelog -n horde +* Wed Mar 29 2006 - mmarek@suse.cz +- fix insecure eval() calls (backport from 3.0.10 release) + [#161768] (eval.patch) * Mon Mar 27 2006 - mmarek@suse.cz - require php-dom, which is needed by the configuration tool [#159335] ++++++ horde-3.0.9-eval.patch ++++++ --- lib/Horde/Util.php +++ lib/Horde/Util.php @@ -71,7 +71,7 @@ if (func_num_args() == 0) { return false; } - $eval = false; + $include = false; $args = func_get_args(); $function = array_shift($args); if (is_array($function)) { @@ -82,17 +82,31 @@ ($function == 'include_once') || ($function == 'require') || ($function == 'require_once')) { - $eval = true; - } elseif (!function_exists($function) && - ($function != 'eval')) { + $include = true; + } elseif (!function_exists($function)) { return false; } ob_start(); - if ($eval) { - eval($function . " '" . implode(',', $args) . "';"); - } elseif ($function == 'eval') { - eval($args[0]); + if ($include) { + $file = implode(',', $args); + switch ($function) { + case 'include': + include $file; + break; + + case 'include_once': + include_once $file; + break; + + case 'require': + require $file; + break; + + case 'require_once': + require_once $file; + break; + } } else { call_user_func_array($function, $args); } --- services/help/index.php +++ services/help/index.php @@ -53,7 +53,7 @@ require HORDE_TEMPLATES . '/help/menu.inc'; } elseif ($show == 'about') { require $fileroot . '/lib/version.php'; - eval('$version = "' . ucfirst($module) . ' " . ' . String::upper($module) . '_VERSION;'); + $version = String::ucfirst($module) . ' ' . constant(String::upper($module) . '_VERSION'); $credits = Util::bufferOutput('include', $fileroot . '/docs/CREDITS'); $credits = String::convertCharset($credits, 'iso-8859-1', NLS::getCharset()); require HORDE_TEMPLATES . '/help/about.inc'; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de