From nobody Fri Nov 5 01:20:15 2021 X-Original-To: dev-commits-ports-branches@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 27923182A3BA; Fri, 5 Nov 2021 01:20:16 +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 4HljNw00FPz3PYW; Fri, 5 Nov 2021 01:20:16 +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 D4B9A6B8D; Fri, 5 Nov 2021 01:20:15 +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 1A51KFDJ042402; Fri, 5 Nov 2021 01:20:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1A51KFWc042396; Fri, 5 Nov 2021 01:20:15 GMT (envelope-from git) Date: Fri, 5 Nov 2021 01:20:15 GMT Message-Id: <202111050120.1A51KFWc042396@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Yasuhiro Kimura Subject: git: 8393cce3d028 - 2021Q4 - security/mailzu: Fix runtime error with recent PHP List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-branches@freebsd.org X-BeenThere: dev-commits-ports-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yasu X-Git-Repository: ports X-Git-Refname: refs/heads/2021Q4 X-Git-Reftype: branch X-Git-Commit: 8393cce3d02881f00e32cc93b3a716242af34fb3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch 2021Q4 has been updated by yasu: URL: https://cgit.FreeBSD.org/ports/commit/?id=8393cce3d02881f00e32cc93b3a716242af34fb3 commit 8393cce3d02881f00e32cc93b3a716242af34fb3 Author: Krzysztof AuthorDate: 2021-11-05 01:12:22 +0000 Commit: Yasuhiro Kimura CommitDate: 2021-11-05 01:19:58 +0000 security/mailzu: Fix runtime error with recent PHP * Pet portclippy * Re-format Makefile with portfmt PR: 241745 MFH: 2021Q4 (cherry picked from commit c99114e14f7c799db21764b80ef612e9763e0a61) --- security/mailzu/Makefile | 41 +++++++++++++----------- security/mailzu/files/patch-lib_CmnFns.class.php | 21 +++++++----- security/mailzu/files/patch-lib_htmlfilter.php | 11 +++++++ security/mailzu/pkg-plist | 2 +- 4 files changed, 47 insertions(+), 28 deletions(-) diff --git a/security/mailzu/Makefile b/security/mailzu/Makefile index 88f1c7a951b9..f5d1b4cd6c72 100644 --- a/security/mailzu/Makefile +++ b/security/mailzu/Makefile @@ -2,7 +2,7 @@ PORTNAME= mailzu DISTVERSION= 0.8rc3 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= security MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/MailZu%200.8RC3 PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX} @@ -17,33 +17,37 @@ LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= ${LOCALBASE}/sbin/amavisd:security/amavisd-new \ ${PEARDIR}/DB.php:databases/pear-DB@${PHP_FLAVOR} \ ${PEARDIR}/Mail/mime.php:mail/pear-Mail_Mime@${PHP_FLAVOR} \ - ${PEARDIR}/Net/Socket.php:net/pear-Net_Socket@${PHP_FLAVOR} \ - ${PEARDIR}/Mail/mimeDecode.php:mail/pear-Mail_mimeDecode@${PHP_FLAVOR} + ${PEARDIR}/Mail/mimeDecode.php:mail/pear-Mail_mimeDecode@${PHP_FLAVOR} \ + ${PEARDIR}/Net/Socket.php:net/pear-Net_Socket@${PHP_FLAVOR} -PEARDIR?= ${LOCALBASE}/share/pear -PLIST_SUB= WWWOWN="${WWWOWN}" WWWGRP="${WWWGRP}" -SUB_FILES= pkg-message -NO_BUILD= yes -NO_ARCH= yes -USE_PHP= sockets USES= php:flavors,web +USE_PHP= sockets -OPTIONS_DEFINE= IMAP LDAP DOCS -OPTIONS_MULTI= SQL -OPTIONS_MULTI_SQL= MYSQL PGSQL +NO_ARCH= yes +NO_BUILD= yes +SUB_FILES= pkg-message + +PLIST_SUB= WWWGRP="${WWWGRP}" \ + WWWOWN="${WWWOWN}" +PORTDOCS= * + +OPTIONS_DEFINE= DOCS IMAP LDAP OPTIONS_DEFAULT= MYSQL -SQL_DESC= SQL sotage backend -MYSQL_DESC= Use MySQL database storage/auth backend (default) -PGSQL_DESC= Use PostgreSQL database/auth storage backend +OPTIONS_MULTI= SQL +OPTIONS_MULTI_SQL= MYSQL PGSQL + IMAP_DESC= Use IMAP auth backend LDAP_DESC= Use LDAP auth backend +MYSQL_DESC= Use MySQL database storage/auth backend (default) +PGSQL_DESC= Use PostgreSQL database/auth storage backend +SQL_DESC= SQL sotage backend -MYSQL_USE= PHP=mysqli -PGSQL_USE= PHP=pgsql IMAP_USE= PHP=imap LDAP_USE= PHP=ldap +MYSQL_USE= PHP=mysqli +PGSQL_USE= PHP=pgsql -PORTDOCS= * +PEARDIR?= ${LOCALBASE}/share/pear post-patch: ${INSTALL_DATA} ${FILESDIR}/pl.*.php ${WRKSRC}/lang/ @@ -54,7 +58,6 @@ do-install: (cd ${WRKSRC} && ${COPYTREE_SHARE} "config contrib img lang lib templates" \ ${STAGEDIR}${WWWDIR} "! -name '*.orig'") (cd ${WRKSRC} && ${COPYTREE_BIN} scripts ${STAGEDIR}${WWWDIR}) - ${CHMOD} 644 ${STAGEDIR}${WWWDIR}/config/config.php.sample do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} diff --git a/security/mailzu/files/patch-lib_CmnFns.class.php b/security/mailzu/files/patch-lib_CmnFns.class.php index 11bc4a2061ac..2d6d19fa3c08 100644 --- a/security/mailzu/files/patch-lib_CmnFns.class.php +++ b/security/mailzu/files/patch-lib_CmnFns.class.php @@ -227,16 +227,21 @@ { if( ! is_array( $array ) ) return ''; -@@ -441,7 +441,7 @@ class CmnFns { +@@ -441,8 +441,12 @@ class CmnFns { * @param integer $sizeLimit maximum number of messages per page * @param integer $count total number of messages */ - function genMultiPagesLinks( $page, $sizeLimit, $count) { + public static function genMultiPagesLinks( $page, $sizeLimit, $count) { global $link; ++ global $pager_html; ++ global $size_limit; ++ global $query_string_next; ++ global $query_string_last; $total_pages = $count / $sizeLimit; -@@ -501,7 +501,7 @@ class CmnFns { + +@@ -501,7 +505,7 @@ class CmnFns { * Generate HTML for search engine * @param $content_type: 'B' (attachment) or 'S' (spam) */ @@ -321,7 +326,7 @@ $return = false; $strings = array('f_string','s_string','t_string','m_string'); foreach ($strings as $string) { -@@ -593,7 +593,7 @@ class CmnFns { +@@ -593,7 +597,7 @@ class CmnFns { * @param array of variables to exclude * @return query string */ @@ -330,7 +335,7 @@ return CmnFns::array_to_query_string( $_GET, $excl_array ); } -@@ -602,7 +602,7 @@ class CmnFns { +@@ -602,7 +606,7 @@ class CmnFns { * @param none * @return value */ @@ -339,7 +344,7 @@ // If there isnt one set, return NULL $result = NULL; if ( isset($_GET[$get_name]) ) -@@ -617,7 +617,7 @@ class CmnFns { +@@ -617,7 +621,7 @@ class CmnFns { * @param none * @return value */ @@ -348,7 +353,7 @@ // If there isnt one set, return NULL $result = (isset($_POST[$get_name])) ? $_POST[$get_name] : NULL; return $result; -@@ -628,7 +628,7 @@ class CmnFns { +@@ -628,7 +632,7 @@ class CmnFns { * @param none * @return value */ @@ -357,7 +362,7 @@ // If there isnt one set, return NULL $result = (isset($_POST[$get_name])) ? $_POST[$get_name] : NULL; return $result; -@@ -656,7 +656,7 @@ class CmnFns { +@@ -656,7 +660,7 @@ class CmnFns { * INORDER, SESSION, FORM, POST, GET, SERVER * @return value of var */ @@ -366,7 +371,7 @@ switch ($search) { -@@ -699,7 +699,7 @@ class CmnFns { +@@ -699,7 +703,7 @@ class CmnFns { * Redirect using javascript * @param $location string */ diff --git a/security/mailzu/files/patch-lib_htmlfilter.php b/security/mailzu/files/patch-lib_htmlfilter.php new file mode 100644 index 000000000000..217e7843256d --- /dev/null +++ b/security/mailzu/files/patch-lib_htmlfilter.php @@ -0,0 +1,11 @@ +--- lib/htmlfilter.php.orig 2007-06-14 19:00:15 UTC ++++ lib/htmlfilter.php +@@ -106,7 +106,7 @@ function casenormalize(&$val){ + function skipspace($body, $offset){ + $me = 'skipspace'; + preg_match('/^(\s*)/s', substr($body, $offset), $matches); +- if (sizeof($matches{1})){ ++ if (is_array($matches{1}) && sizeof($matches{1})){ + $count = strlen($matches{1}); + spew("$me: skipped $count chars\n"); + $offset += $count; diff --git a/security/mailzu/pkg-plist b/security/mailzu/pkg-plist index e6863a779cd3..697bf08c08fc 100644 --- a/security/mailzu/pkg-plist +++ b/security/mailzu/pkg-plist @@ -1,4 +1,4 @@ -@sample %%WWWDIR%%/config/config.php.sample +@sample(,,644) %%WWWDIR%%/config/config.php.sample %%WWWDIR%%/config/constants.php %%WWWDIR%%/config/index.html %%WWWDIR%%/config/init.php