From owner-dev-commits-ports-all@freebsd.org Mon Aug 9 16:48:47 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E5BFD6579A0; Mon, 9 Aug 2021 16:48:47 +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 4Gk28v61Vsz4rKC; Mon, 9 Aug 2021 16:48:47 +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 B74933ADE; Mon, 9 Aug 2021 16:48:47 +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 179GmlN9021880; Mon, 9 Aug 2021 16:48:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 179GmlKY021879; Mon, 9 Aug 2021 16:48:47 GMT (envelope-from git) Date: Mon, 9 Aug 2021 16:48:47 GMT Message-Id: <202108091648.179GmlKY021879@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Li-Wen Hsu Subject: git: 48dbe244c1ff - 2021Q3 - security/mailzu: Exlude php short tag 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/2021Q3 X-Git-Reftype: branch X-Git-Commit: 48dbe244c1fff5de288b3daef0e427a8b2b45580 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Aug 2021 16:48:48 -0000 The branch 2021Q3 has been updated by lwhsu: URL: https://cgit.FreeBSD.org/ports/commit/?id=48dbe244c1fff5de288b3daef0e427a8b2b45580 commit 48dbe244c1fff5de288b3daef0e427a8b2b45580 Author: Krzysztof AuthorDate: 2021-08-09 16:46:51 +0000 Commit: Li-Wen Hsu CommitDate: 2021-08-09 16:48:39 +0000 security/mailzu: Exlude php short tag PR: 257635 (cherry picked from commit f28572fb24c7c691f88815e9cce52d4fa3599fa0) --- security/mailzu/Makefile | 2 +- security/mailzu/files/patch-config_langs.php | 10 +- security/mailzu/files/patch-help.php | 148 ++++++++++++++++++++ security/mailzu/files/patch-lib_CmnFns.class.php | 83 ++++++++++- security/mailzu/files/patch-lib_Template.class.php | 95 ++++++++++++- .../mailzu/files/patch-templates_auth.template.php | 89 ++++++++++++ .../files/patch-templates_common.template.php | 153 +++++++++++++++++++++ .../files/patch-templates_sendmail.template.php | 44 ++++++ .../files/patch-templates_summary.template.php | 64 +++++++++ .../files/patch-templates_viewmail.template.php | 69 ++++++++++ security/mailzu/files/pkg-message.in | 23 +++- 11 files changed, 767 insertions(+), 13 deletions(-) diff --git a/security/mailzu/Makefile b/security/mailzu/Makefile index a0faa8b94b4d..88f1c7a951b9 100644 --- a/security/mailzu/Makefile +++ b/security/mailzu/Makefile @@ -2,7 +2,7 @@ PORTNAME= mailzu DISTVERSION= 0.8rc3 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= security MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/MailZu%200.8RC3 PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX} diff --git a/security/mailzu/files/patch-config_langs.php b/security/mailzu/files/patch-config_langs.php index 79caddef7ad3..acda9c7f41de 100644 --- a/security/mailzu/files/patch-config_langs.php +++ b/security/mailzu/files/patch-config_langs.php @@ -10,12 +10,16 @@ ); // Language files directory -@@ -113,7 +114,7 @@ function get_browser_lang() { +@@ -113,10 +114,10 @@ function get_browser_lang() { global $languages; if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { - $http_accepted = split(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']); -+ $http_accepted = str_split(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']); ++ $http_accepted = explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']); for ($i = 0; $i < count($http_accepted); $i++) { foreach ($languages as $lang => $vals) { - if (eregi($vals[0], $http_accepted[$i])) +- if (eregi($vals[0], $http_accepted[$i])) ++ if (preg_match($vals[0], $http_accepted[$i])) + return $lang; + } + } diff --git a/security/mailzu/files/patch-help.php b/security/mailzu/files/patch-help.php new file mode 100644 index 000000000000..c9e198ddac22 --- /dev/null +++ b/security/mailzu/files/patch-help.php @@ -0,0 +1,148 @@ +--- help.php.orig 2007-06-14 19:00:15 UTC ++++ help.php +@@ -1,73 +1,73 @@ +- +-* @version 07-10-04 +-* @package phpScheduleIt +-* +-* Copyright (C) 2003 - 2005 phpScheduleIt +-* License: GPL, see LICENSE +-*/ +- +-include_once('config/config.php'); +- +-global $languages; +-global $lang; +-global $charset; +- +-echo "\n"; +-?> +- +- +- +-MailZu <?=translate('Help')?> +- +- +- +- +- +- ++ ++* @version 07-10-04 ++* @package phpScheduleIt ++* ++* Copyright (C) 2003 - 2005 phpScheduleIt ++* License: GPL, see LICENSE ++*/ ++ ++include_once('config/config.php'); ++ ++global $languages; ++global $lang; ++global $charset; ++ ++echo "\n"; ++?> ++ ++ ++ ++MailZu <?php echo translate('Help')?> ++ ++ ++ ++ ++ ++ + diff --git a/security/mailzu/files/patch-lib_CmnFns.class.php b/security/mailzu/files/patch-lib_CmnFns.class.php index 605dcb945c2e..11bc4a2061ac 100644 --- a/security/mailzu/files/patch-lib_CmnFns.class.php +++ b/security/mailzu/files/patch-lib_CmnFns.class.php @@ -168,7 +168,7 @@ header("Refresh: $time; URL=$location"); if ($die) exit; } -@@ -352,7 +352,7 @@ class CmnFns { +@@ -352,11 +352,11 @@ class CmnFns { * Prints out the HTML to choose a language * @param none */ @@ -177,6 +177,20 @@ global $conf; ?> +- translate('From'), +@@ -514,11 +514,11 @@ class CmnFns { + + ?> + +- ++ + +- ++ + \n\t\t\t + +
 
 
  +- $name) { +@@ -543,34 +543,34 @@ class CmnFns { + $i ++; + } + ?> +- : ++ : +
 \n" : "  "; + ?> +- +- " /> ++ "; + ?> +  
+- + +- ++ + + +- <?=$this->title?> ++ <?php echo $this->title?> + +- ++ + +- +- ++ ++ + + + +- + +

+- +

+ +

- -+ ++

+
+ + + +- + + +- + + +- +-

v

++

v

+ + +- +-
++ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +@@ -94,9 +94,9 @@ function printLoginForm($msg = '', $resume = '') { + +
+-
++
+
+-

++

+
+ +@@ -47,7 +47,7 @@ function printLoginForm($msg = '', $resume = '') { +
+-

++

+
+ +@@ -56,26 +56,26 @@ function printLoginForm($msg = '', $resume = '') { + +
+-

++

+
+- ++ +
+-

++

+
+- ++ +
+-

++

+
+ +@@ -84,8 +84,8 @@ function printLoginForm($msg = '', $resume = '') { +
+

+- +- ++ ++ +

+
+

+-doLink('javascript: help();', translate('Help'), '', '', translate('Get online help')) ?> ++doLink('javascript: help();', translate('Help'), '', '', translate('Get online help')) ?> +

+ +- diff --git a/security/mailzu/files/patch-templates_common.template.php b/security/mailzu/files/patch-templates_common.template.php new file mode 100644 index 000000000000..13779fe4936b --- /dev/null +++ b/security/mailzu/files/patch-templates_common.template.php @@ -0,0 +1,153 @@ +--- templates/common.template.php.orig 2007-06-14 19:00:15 UTC ++++ templates/common.template.php +@@ -47,10 +47,10 @@ function showQuickLinks() { + + + + + +@@ -58,12 +58,12 @@ function showQuickLinks() { +
+- ++ +
+- doLink("javascript: help('quick_links');", '?', '', 'color: #FFFFFF', translate('Help') . ' - ' . translate('My Quick Links')) ?> ++ doLink("javascript: help('quick_links');", '?', '', 'color: #FFFFFF', translate('Help') . ' - ' . translate('My Quick Links')) ?> +
+
+ + + +@@ -120,7 +120,7 @@ function showQuickLinks() { + + +
+- »': + "

\t"; + $link->doLink('summary.php', translate('Quarantine Summary')) ?> +

+- »': + "

\t"; + $link->doLink('messagesIndex.php?ctype=A', translate('My Quarantine')); +@@ -78,7 +78,7 @@ function showQuickLinks() { + ?> +

+
+- »': +@@ -108,11 +108,11 @@ function showQuickLinks() { + } + ?> +

+- doLink('javascript: help();', translate('Help')) ?> ++ doLink('javascript: help();', translate('Help')) ?> +

+
+

+- doLink('index.php?logout=true', translate('Log Out')) ?> ++ doLink('index.php?logout=true', translate('Log Out')) ?> +

+
+- +
+- + +- +
+- + + +-"; + ?> +- + +
+- ++"; + ?> +
+- + + +- +- +- ++ ++ ++ + + +
+-   +- ++   ++ +
+ +- +-
+-

++
++

+
+- + + +- + +
+- doLink('javascript: help(\'msg_index\');', '?', '', 'color: #FFFFFF;', ++ doLink('javascript: help(\'msg_index\');', '?', '', 'color: #FFFFFF;', + translate('Help') . ' - ' . translate('Email Administrator')) ?> +
+ +@@ -45,11 +45,11 @@ function printsendmail(){ + + + +- ++ + +

+-   
++   
+   

+-   
++   
+   
+   

+ +@@ -60,7 +60,7 @@ function printsendmail(){ +
+ +- + + +- ++ + + + +
+- doLink('javascript: help(\'msg_summary\');', '?', '', 'color: #FFFFFF;', ++ doLink('javascript: help(\'msg_summary\');', '?', '', 'color: #FFFFFF;', + translate('Help') . ' - ' . translate($_SESSION['sessionNav'])) ?> +
+ +@@ -52,29 +52,29 @@ function showSummary($count_array) { + + + +- ++ + + +- ++ + + +- ++ + + +- ++ + + +- ++ + + +- ++ + + +- ++ + + + +- $val) { + echo ''; + echo ($key == 'Total' ? '' : '') . "$key \n"; +@@ -89,7 +89,7 @@ function showSummary($count_array) { + + + +- diff --git a/security/mailzu/files/patch-templates_viewmail.template.php b/security/mailzu/files/patch-templates_viewmail.template.php new file mode 100644 index 000000000000..79dacdd38014 --- /dev/null +++ b/security/mailzu/files/patch-templates_viewmail.template.php @@ -0,0 +1,69 @@ +--- templates/viewmail.template.php.orig 2007-06-14 19:00:15 UTC ++++ templates/viewmail.template.php +@@ -25,7 +25,7 @@ function startMessage() { + + + + +
+- ++ + +
+
+- + + +- + + +- ‹‹ ++ ‹‹ + + +- ++ + | + +- ++ + + + +- + + +- ++ + | +- ++ + + + + +- + +An example for nginx.conf: + +location /mailzu/ { + alias %%WWWDIR%%/; + index index.php; + allow 127.0.0.0/8; + deny all; + + location ~ \.php$ { + fastcgi_pass unix:/var/run/php-fpm.socket; + fastcgi_param HTTPS on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $request_filename; + include fastcgi_params; + } +} + EOM } ]