From nobody Sun Dec 19 10:07:20 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5727219041EE; Sun, 19 Dec 2021 10:07:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JGz0n0WVYz3qGZ; Sun, 19 Dec 2021 10:07:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E5AF4203F9; Sun, 19 Dec 2021 10:07:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BJA7Kel000481; Sun, 19 Dec 2021 10:07:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BJA7KIY000480; Sun, 19 Dec 2021 10:07:20 GMT (envelope-from git) Date: Sun, 19 Dec 2021 10:07:20 GMT Message-Id: <202112191007.1BJA7KIY000480@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 0cbf2ec70b86 - main - security/mailzu: Fix errors with php74 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0cbf2ec70b866157b1e32b57e99f5f6ff3161301 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639908441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oa6Pn7SIHqVvfXacQhMce0xZYTKZGFf+hY4Vcn+Xg50=; b=TfFpFztFsJiGBevTr0p+y3RxJXu5xk5BBTGX3EBmG+TYs187G290fRaicYQf97b9Didmk5 zJ4Y1nW9XzUO2Lj6qrNJ1j1wWOAEi1BIHkjSR6BtN7uSLDsvj/29JqTBDs32CVyHiduTUb aBIr5OYBOFsMboolobYMruxBBaMUNEPjaYTB6Zro2abSx9rMIhL9nAlOrRacnwNeVi19Zv Io08atTU9ELW2Fi0VD6zDQ0T5zcVbamSEdlkjcpEZOFZSpy7s4wOWpwlJesq9zRLxw7e9s Y6d6sRUPO8hCy7p7rPKl4xeDdu9GmFCMWTLhkXFnTvGOyRAiiWey9UAfJwbK9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639908441; a=rsa-sha256; cv=none; b=MBMol9WtE7b9mkBwjiQD6E6UCd/bOrLS4VrXPnvI+e5oelKFnSFCRcziukPO7xssc05hbv Cg1HnanaUSiUXVzfQHnK1TzRwzT6uzpeinp/KGjN81hSiL2iriwahNZLv0FGocOampCHc1 zbwsc7ZzEmQ7PSIJCWHQxEdY81+fpW07/6lRZpA8ixb9+rE8cC0YhDKQVIVfeC3MDs63bH fVb/a/EHwbxU3u4WJlXVZlqRi8ANru2PPs0rI9i34rvL2c4SEOAQSfgJlO2PU2nt+cl9Jz oHd0VDoaodz7viapLxvm7ki7AUHSG4rXjo4KKtXblWPuEt1UzRonkmccXzxV8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/ports/commit/?id=0cbf2ec70b866157b1e32b57e99f5f6ff3161301 commit 0cbf2ec70b866157b1e32b57e99f5f6ff3161301 Author: Krzysztof AuthorDate: 2021-12-19 10:05:27 +0000 Commit: Li-Wen Hsu CommitDate: 2021-12-19 10:07:03 +0000 security/mailzu: Fix errors with php74 PR: 259708 --- security/mailzu/Makefile | 2 +- security/mailzu/files/patch-config_constants.php | 8 + security/mailzu/files/patch-lib-DBEngine.class.php | 24 +++ security/mailzu/files/patch-lib_CmnFns.class.php | 6 +- security/mailzu/files/patch-lib_MailMime.class.php | 52 +++++ .../files/patch-templates_quarantine.template.php | 240 ++++++++++++++++++++- .../files/patch-templates_viewmail.template.php | 15 +- 7 files changed, 340 insertions(+), 7 deletions(-) diff --git a/security/mailzu/Makefile b/security/mailzu/Makefile index f5d1b4cd6c72..6a806dc2b6c2 100644 --- a/security/mailzu/Makefile +++ b/security/mailzu/Makefile @@ -2,7 +2,7 @@ PORTNAME= mailzu DISTVERSION= 0.8rc3 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= security MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/MailZu%200.8RC3 PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX} diff --git a/security/mailzu/files/patch-config_constants.php b/security/mailzu/files/patch-config_constants.php new file mode 100644 index 000000000000..08794aec82a6 --- /dev/null +++ b/security/mailzu/files/patch-config_constants.php @@ -0,0 +1,8 @@ +--- config/constants.php.orig 2007-06-14 19:00:15 UTC ++++ config/constants.php +@@ -1,4 +1,4 @@ +-fetchRow()) { +- $return .= $rs['mail_text']; ++ $ret_text .= $rs['mail_text']; + } + + $result->free(); + +- return $return; ++ return $ret_text; + } + + /** diff --git a/security/mailzu/files/patch-lib_CmnFns.class.php b/security/mailzu/files/patch-lib_CmnFns.class.php index 2d6d19fa3c08..e78d4ebc8d61 100644 --- a/security/mailzu/files/patch-lib_CmnFns.class.php +++ b/security/mailzu/files/patch-lib_CmnFns.class.php @@ -250,7 +250,7 @@ global $conf; $fields_array = array("f" => translate('From'), -@@ -514,11 +514,11 @@ class CmnFns { +@@ -514,11 +518,11 @@ class CmnFns { ?> @@ -265,7 +265,7 @@ $i = 1; $array_size = count($fields_array); foreach ($fields_array as $k => $name) { -@@ -543,34 +543,34 @@ class CmnFns { +@@ -543,34 +547,34 @@ class CmnFns { $i ++; } ?> @@ -317,7 +317,7 @@ } -@@ -579,7 +579,7 @@ class CmnFns { +@@ -579,7 +583,7 @@ class CmnFns { * @param none * @return value boolean */ diff --git a/security/mailzu/files/patch-lib_MailMime.class.php b/security/mailzu/files/patch-lib_MailMime.class.php new file mode 100644 index 000000000000..b44eb75f73fd --- /dev/null +++ b/security/mailzu/files/patch-lib_MailMime.class.php @@ -0,0 +1,52 @@ +--- lib/MailMime.class.php.orig 2007-06-14 19:00:15 UTC ++++ lib/MailMime.class.php +@@ -94,8 +94,14 @@ function MsgParseBody($struct) { + + case "text": + // Do not display attached text types +- if ($attachment = $struct->d_parameters['filename'] or +- $attachment = $struct->d_parameters['name']) { ++ if ( isset($struct->d_parameters['filename']) ) { ++ $attachment = $struct->d_parameters['filename']; ++ } elseif ( isset($struct->d_parameters['name']) ) { ++ $attachment = $struct->d_parameters['name']; ++ } else { ++ $attachment = NULL; ++ } ++ if ($attachment) { + array_push($filelist, $attachment); + break; + } +@@ -117,7 +123,9 @@ function MsgParseBody($struct) { + default: + // Save the listed filename or notify the + // reader that this mail is not displayed completely +- $attachment = $struct->d_parameters['filename']; ++ if ( isset( $struct->d_parameters['filename'] )) { ++ $attachment = $struct->d_parameters['filename']; ++ } else { $attachment = NULL; } + $attachment ? array_push($filelist, $attachment) : $errors['Unsupported MIME objects present'] = true; + + } +@@ -137,9 +145,9 @@ function FindMultiAlt($parts) { + foreach ($parts as $cur_part) { + $type = GetCtype($cur_part); + if ($type == 'multipart/related') { +- $type = $cur_part->d_parameters['type']; +- // Mozilla bug. Mozilla does not provide the parameter type. +- if (!$type) $type = 'text/html'; ++ if ( isset( $cur_part->d_parameters['type'] )) { $type = $cur_part->d_parameters['type']; } ++ // Mozilla bug. Mozilla does not provide the parameter type. ++ if (!$type) $type = 'text/html'; + } + $altCount = count($alt_pref); + for ($j = $best_view; $j < $altCount; ++$j) { +@@ -163,7 +171,7 @@ function FindMultiAlt($parts) { + */ + function FindMultiRel($struct) { + $entities = array(); +- $type = $struct->d_parameters['type']; ++ if ( isset( $cur_part->d_parameters['type'] )) { $type = $cur_part->d_parameters['type']; } + // Mozilla bug. Mozilla does not provide the parameter type. + if (!$type) $type = 'text/html'; + // Bad Headers sometimes have invalid MIME.... diff --git a/security/mailzu/files/patch-templates_quarantine.template.php b/security/mailzu/files/patch-templates_quarantine.template.php index 7f4c469fa24f..aa5b9b000fdb 100644 --- a/security/mailzu/files/patch-templates_quarantine.template.php +++ b/security/mailzu/files/patch-templates_quarantine.template.php @@ -1,6 +1,99 @@ --- templates/quarantine.template.php.orig 2007-06-14 19:00:15 UTC +++ templates/quarantine.template.php -@@ -143,7 +143,7 @@ function showMessagesTable($content_type +@@ -56,10 +56,10 @@ function showMessagesTable($content_type, $res, $page, + + + +- +- ++ ++ + +- + + + + +@@ -93,43 +93,43 @@ function showMessagesTable($content_type, $res, $page, + + + +- 1) || ((Auth::isMailAdmin()) && ++ 1) || ((Auth::isMailAdmin()) && + ("Site Quarantine" == $_SESSION['sessionNav'] || "Site Pending Requests" == $_SESSION['sessionNav']))) { ?> +- +- +- +- +- +- +- +- +- +- ++ + + +- "; echo ' '; +@@ -192,7 +192,7 @@ function showMessagesTable($content_type, $res, $page, + +
+- + +
+- doLink('javascript: help(\'msg_index\');', '?', '', 'color: #FFFFFF;', ++ doLink('javascript: help(\'msg_index\');', '?', '', 'color: #FFFFFF;', + translate('Help') . ' - ' . translate('My Quarantine')) ?> +
+
 > +- doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) ++ > ++ doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) + . '&order=recip.email&vert=' . $new_vert, translate('To'), '', '', $mouseover_text) ?> + > +- doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) ++ ++ > ++ doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) + . '&order=from_addr&vert=' . $new_vert, translate('From'), '', '', $mouseover_text) ?> + > +- doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) ++ > ++ doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) + . '&order=msgs.subject&vert=' . $new_vert, translate('Subject'), '', '', $mouseover_text) ?> + > +- doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) ++ > ++ doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) + . '&order=msgs.time_num&vert=' . $new_vert, translate('Date'), '', '', $mouseover_text) ?> + > +- doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) ++ > ++ doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) + . '&order=spam_level&vert=' . $new_vert, translate('Score'), '', '', $mouseover_text) ?> + > +- doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) ++ > ++ doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) + . '&order=msgs.content&vert=' . $new_vert, translate('Content Type'), '', '', $mouseover_text) ?> + > +- doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) ++ > ++ doLink($_SERVER['PHP_SELF'] . '?' . CmnFns::querystring_exclude_vars( array('order','vert')) + . '&order=mail_id&vert=' . $new_vert, translate('Mail ID'), '', '', $mouseover_text) ?> +
1) || (Auth::isMailAdmin() && ("Site Quarantine" == $_SESSION['sessionNav'] || "Site Pending Requests" == $_SESSION['sessionNav']))) { echo ' ' . $to . '
+ +- + + +- '; + echo '' . translate('There are no matching records.') . ''; + echo ''; +@@ -221,25 +221,25 @@ function printSearchEngine($content_type, $submit_page + + + + + +
+- ++ + +
+- doLink('javascript: help(\'search\');', '?', '', 'color: #FFFFFF;', translate('Help') . ' - ' . translate('My Re ++ doLink('javascript: help(\'search\');', '?', '', 'color: #FFFFFF;', translate('Help') . ' - ' . translate('My Re + servations')) ?> +
+
+-