Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Aug 2021 16:48:47 GMT
From:      Li-Wen Hsu <lwhsu@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: 48dbe244c1ff - 2021Q3 - security/mailzu: Exlude php short tag
Message-ID:  <202108091648.179GmlKY021879@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2021Q3 has been updated by lwhsu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=48dbe244c1fff5de288b3daef0e427a8b2b45580

commit 48dbe244c1fff5de288b3daef0e427a8b2b45580
Author:     Krzysztof <ports@bsdserwis.com>
AuthorDate: 2021-08-09 16:46:51 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
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 @@
+-<?php
+-/**
+-* This is the pop-up help file for the system
+-* This function simply prints out an HTML help file for
+-* users to reference
+-* @author Nick Korbel <lqqkout13@users.sourceforge.net>
+-* @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 "<?xml version=\"1.0\" encoding=\"$charset\"?" . ">\n";
+-?>
+-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+-	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;
+-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?=$languages[$lang][2]?>" lang="<?=$languages[$lang][2]?>">
+-<head>
+-<title>MailZu <?=translate('Help')?></title>
+-<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>" />
+-<style type="text/css">
+-<!--
+-li {
+-	font-size: 12px;
+-	margin-top: 0px;
+-	margin-right: 0px;
+-	margin-bottom: 0px;
+-	margin-left: 0px;
+-}
+-body {
+-	font-family: Verdana, Arial, Helvetica, sans-serif;
+-	margin-top: 5px;
+-	margin-right: 5px;
+-	margin-bottom: 5px;
+-	margin-left: 5px;
+-	background-color: #F0F0F0;
+-}
+-p {
+-	font-size: 12px;
+-	margin-left: 25px;
+-	margin-top: 3px;
+-}
+-h5 {
+-	margin-left: 10px;
+-}
+-a {
+-	color: #104E8B;
+-}
+-a:hover {
+-	color: #474747;
+-}
+--->
+-</style>
+-</head>
+-<body>
+-<?
+-$help_file = 'lang/' . $languages[$lang][2] . '.help.php';
+-if (file_exists($help_file)) {
+-	include_once($help_file);
+-}
+-else {
+-	include_once('lang/en.help.php');
+-}
+-?>
+-</body>
++<?php
++/**
++* This is the pop-up help file for the system
++* This function simply prints out an HTML help file for
++* users to reference
++* @author Nick Korbel <lqqkout13@users.sourceforge.net>
++* @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 "<?xml version=\"1.0\" encoding=\"$charset\"?" . ">\n";
++?>
++<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
++	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;
++<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $languages[$lang][2]?>" lang="<?php echo $languages[$lang][2]?>">
++<head>
++<title>MailZu <?php echo translate('Help')?></title>
++<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset?>" />
++<style type="text/css">
++<!--
++li {
++	font-size: 12px;
++	margin-top: 0px;
++	margin-right: 0px;
++	margin-bottom: 0px;
++	margin-left: 0px;
++}
++body {
++	font-family: Verdana, Arial, Helvetica, sans-serif;
++	margin-top: 5px;
++	margin-right: 5px;
++	margin-bottom: 5px;
++	margin-left: 5px;
++	background-color: #F0F0F0;
++}
++p {
++	font-size: 12px;
++	margin-left: 25px;
++	margin-top: 3px;
++}
++h5 {
++	margin-left: 10px;
++}
++a {
++	color: #104E8B;
++}
++a:hover {
++	color: #474747;
++}
++-->
++</style>
++</head>
++<body>
++<?php
++$help_file = 'lang/' . $languages[$lang][2] . '.help.php';
++if (file_exists($help_file)) {
++	include_once($help_file);
++}
++else {
++	include_once('lang/en.help.php');
++}
++?>
++</body>
+ </html>
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;
  		?>
  		<select name="language" class="textbox" onchange="changeLanguage(this);">
+-		<?
++		<?php
+ 			$languages = get_language_list();
+ 			foreach ($languages as $lang => $settings) {
+ 				echo '<option value="' . $lang . '"'
+@@ -365,7 +365,7 @@ class CmnFns {
+ 			}
+ 		?>
+ 		</select>
+-		<?
++		<?php
+ 	}
+ 	
+ 	/**
 @@ -375,7 +375,7 @@ class CmnFns {
  	* @param string $str string to search for links to create
  	* @return string with 'URL-like' text changed into clickable links
@@ -231,6 +245,73 @@
  		global $conf;
  
  		$fields_array = array("f" => translate('From'), 
+@@ -514,11 +514,11 @@ class CmnFns {
+ 
+ 		?>	
+ 		<table border=0 width="100%">
+-		<form action="<? echo $submit_page ?>" method="get" name="quarantine">
++		<form action="<?php echo $submit_page ?>" method="get" name="quarantine">
+ 
+-			<tr><td colspan=2 align="center"><? echo translate('Search for messages whose:'); ?>&nbsp;</td></tr>
++			<tr><td colspan=2 align="center"><?php echo translate('Search for messages whose:'); ?>&nbsp;</td></tr>
+ 			<tr><td align="right">&nbsp;
+-		<?
++		<?php
+ 			$i = 1;
+ 			$array_size = count($fields_array);
+ 			foreach ($fields_array as $k => $name) {
+@@ -543,34 +543,34 @@ class CmnFns {
+ 				$i ++;
+ 			}
+ 		?>
+-			<? echo translate('Content Type'); ?>:
++			<?php echo translate('Content Type'); ?>:
+ 			<select name="ctype" class="button">
+-					<option value="A" <? echo ($content_type == 'A' ?  ' selected="true"':''); ?>>
+-					<? echo translate('All'); ?></option>
+-					<option value="S" <? echo ($content_type == 'S' ?  ' selected="true"':''); ?>>
+-					<? echo translate('Spam'); ?></option>
+-					<option value="B" <? echo ($content_type == 'B' ?  ' selected="true"':''); ?>>
+-					<? echo translate('Banned'); ?></option>
+-			<? if (Auth::isMailAdmin() || $conf['app']['allowViruses']) { ?>
+-					<option value="V" <? echo ($content_type == 'V' ?  ' selected="true"':''); ?>>
+-					<? echo translate('Virus'); ?></option>
+-			<? } 
++					<option value="A" <?php echo ($content_type == 'A' ?  ' selected="true"':''); ?>>
++					<?php echo translate('All'); ?></option>
++					<option value="S" <?php echo ($content_type == 'S' ?  ' selected="true"':''); ?>>
++					<?php echo translate('Spam'); ?></option>
++					<option value="B" <?php echo ($content_type == 'B' ?  ' selected="true"':''); ?>>
++					<?php echo translate('Banned'); ?></option>
++			<?php if (Auth::isMailAdmin() || $conf['app']['allowViruses']) { ?>
++					<option value="V" <?php echo ($content_type == 'V' ?  ' selected="true"':''); ?>>
++					<?php echo translate('Virus'); ?></option>
++			<?php } 
+ 				 if (Auth::isMailAdmin() || $conf['app']['allowBadHeaders']) { ?>
+-					<option value="H" <? echo ($content_type == 'H' ?  ' selected="true"':''); ?>>
+-					<? echo translate('Bad Header'); ?></option>				
+-			<? }
++					<option value="H" <?php echo ($content_type == 'H' ?  ' selected="true"':''); ?>>
++					<?php echo translate('Bad Header'); ?></option>				
++			<?php }
+ 			echo "</select>";
+ 			$i ++;
+ 			echo ($i % 2) ? "&nbsp;</td></tr>\n\t\t\t<tr><td colspan='2' align='center'>&nbsp\n" : "&nbsp;</td><td align='left'>&nbsp";
+ 			?>
+-			<input type="submit" class="button" name="search_action" value="<? echo translate('Search'); ?>" />
+-			<? if (CmnFns::didSearch()) 
++			<input type="submit" class="button" name="search_action" value="<?php echo translate('Search'); ?>" />
++			<?php if (CmnFns::didSearch()) 
+ 				echo "<input type=\"submit\" class=\"button\" name=\"search_action\" value=\"" . translate('Clear search results') . "\" />";
+ 			?>
+ 			&nbsp;</td></tr>
+ 		</form>
+ 		</table>
+-		<?
++		<?php
+ 
+ 	}
+ 
 @@ -579,7 +579,7 @@ class CmnFns {
          * @param none
          * @return value boolean
diff --git a/security/mailzu/files/patch-lib_Template.class.php b/security/mailzu/files/patch-lib_Template.class.php
index 5ec0cfe0ba80..b8d91c4fbd89 100644
--- a/security/mailzu/files/patch-lib_Template.class.php
+++ b/security/mailzu/files/patch-lib_Template.class.php
@@ -1,11 +1,100 @@
 --- lib/Template.class.php.orig	2007-06-14 19:00:15 UTC
 +++ lib/Template.class.php
-@@ -111,7 +111,7 @@ class Template {
+@@ -57,21 +57,21 @@ class Template {
+ 	?>
+ 	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ 		"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;
+-	<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?=$languages[$lang][2]?>" lang="<?=$languages[$lang][2]?>">
++	<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo$languages[$lang][2]?>" lang="<?php echo$languages[$lang][2]?>">
+ 	<head>
+ 	<title>
+-	<?=$this->title?>
++	<?php echo $this->title?>
+ 	</title>
+-	<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>" />
++	<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset?>" />
+ 	<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
+-	<script language="JavaScript" type="text/javascript" src="<?=$path?>functions.js"></script>
+-	<!--<link href="<?=$path?>css.css" rel="stylesheet" type="text/css" />-->
++	<script language="JavaScript" type="text/javascript" src="<?php echo $path?>functions.js"></script>
++	<!--<link href="<?php echo $path?>css.css" rel="stylesheet" type="text/css" />-->
+ 	<style type="text/css">
+-	@import url(<?=$path?>css.css);
++	@import url(<?php echo $path?>css.css);
+ 	</style>
+ 	</head>
+ 	<body>
+-	<?
++	<?php
+ 	}
+ 	
+ 	
+@@ -96,31 +96,31 @@ class Template {
+ 	  <tr>
+ 		<td class="mainBkgrdClr">
+ 		  <h4 class="welcomeBack">
+-		    <?= 
++		    <?php echo 
+ 		      translate('Welcome Back', array($_SESSION['sessionName'], 1));
+ 		      // Notify if the person logged in is admin
+ 		      echo (Auth::isMailAdmin() ? ' (' . translate('Administrator') . ')' : '');
+ 		    ?>
+ 		  </h4>
+ 		  <!--<p>
+-			<? $this->link->doLink($this->dir_path . 'index.php?logout=true', translate('Log Out')) ?>
++			<?php $this->link->doLink($this->dir_path . 'index.php?logout=true', translate('Log Out')) ?>
+ 			|
+-			<? $this->link->doLink($this->dir_path . 'summary.php', translate('My Control Panel')) ?>
++			<?php $this->link->doLink($this->dir_path . 'summary.php', translate('My Control Panel')) ?>
+ 		  </p>-->
+ 		</td>
  		<td class="mainBkgrdClr" valign="top">
  		  <div align="right">
  		    <p>
 -			<?= translate_date('header', mktime());?>
-+			<?= translate_date('header', time());?>
++			<?php echo translate_date('header', time());?>
  			</p>
  			<!--<p>
- 			  <? $this->link->doLink('javascript: help();', translate('Help')) ?>
+-			  <? $this->link->doLink('javascript: help();', translate('Help')) ?>
++			  <?php $this->link->doLink('javascript: help();', translate('Help')) ?>
+ 			</p>-->
+ 		  </div>
+ 		</td>
+ 	  </tr>
+ 	</table>
+-	<?
++	<?php
+ 	}
+ 	
+ 	
+@@ -134,7 +134,7 @@ class Template {
+ 	<table width="100%" border="0" cellspacing="0" cellpadding="10" style="border: solid #CCCCCC 1px;">
+ 	  <tr>
+ 		<td bgcolor="#FAFAFA">
+-		  <?
++		  <?php
+ 	}
+ 	
+ 	
+@@ -147,7 +147,7 @@ class Template {
+ 		</td>
+ 	  </tr>
+ 	</table>
+-	<?
++	<?php
+ 	}
+ 	
+ 	
+@@ -160,10 +160,10 @@ class Template {
+ 	function printHTMLFooter() {
+ 		global $conf;
+ 	?>
+-	<p align="center"><a href="http://www.mailzu.net"><?=$conf['app']['title']?>; v<?=$conf['app']['version']?></a></p>
++	<p align="center"><a href="http://www.mailzu.net"><?php echo $conf['app']['title']?> v<?php echo $conf['app']['version']?></a></p>
+ 	</body>
+ 	</html>
+-	<?
++	<?php
+ 	}
+ 	
+ 	/**
diff --git a/security/mailzu/files/patch-templates_auth.template.php b/security/mailzu/files/patch-templates_auth.template.php
new file mode 100644
index 000000000000..c78eebaaebcb
--- /dev/null
+++ b/security/mailzu/files/patch-templates_auth.template.php
@@ -0,0 +1,89 @@
+--- templates/auth.template.php.orig	2007-06-14 19:00:15 UTC
++++ templates/auth.template.php
+@@ -27,19 +27,19 @@ function printLoginForm($msg = '', $resume = '') {
+ 	if (!empty($msg)) 
+ 		CmnFns::do_error_box($msg, '', false);
+ ?>
+-<form name="login" method="post" action="<?=$_SERVER['PHP_SELF']?>">
++<form name="login" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
+ <table width="350px" border="0" cellspacing="0" cellpadding="1" align="center">
+ <tr>
+   <td bgcolor="#CCCCCC">
+ 	<table width="100%" border="0" cellspacing="0" cellpadding="3">
+ 	  <tr bgcolor="#EDEDED">
+ 		<td colspan="2" style="border-bottom: solid 1px #CCCCCC;">
+-		  <h5 align="center"><?=translate('Please Log In')?></h5>
++		  <h5 align="center"><?php echo translate('Please Log In')?></h5>
+ 		</td>
+ 	  </tr>
+ 	  <tr bgcolor="#FFFFFF">
+ 		<td width="150">
+-		  <p><b><?=translate('Login')?></b></p>
++		  <p><b><?php echo translate('Login')?></b></p>
+ 		</td>
+ 		<td>
+ 		  <input type="text" name="email" class="textbox" />
+@@ -47,7 +47,7 @@ function printLoginForm($msg = '', $resume = '') {
+ 	  </tr>
+ 	  <tr bgcolor="#FFFFFF">
+ 		<td>
+-		  <p><b><?=translate('Password')?></b></p>
++		  <p><b><?php echo translate('Password')?></b></p>
+ 		</td>
+ 		<td>
+ 		  <input type="password" name="password" class="textbox" />
+@@ -56,26 +56,26 @@ function printLoginForm($msg = '', $resume = '') {
+ 	  <?php if ($conf['auth']['serverType'] === 'exchange') { ?>
+ 	  <tr bgcolor="#FFFFFF">
+ 		<td>
+-		  <p><b><?=translate('Domain')?></b></p>
++		  <p><b><?php echo translate('Domain')?></b></p>
+ 		</td>
+ 		<td>
+-		  <input type="text" name="domain" class="textbox" value="<?=$conf['auth']['exch_domain']?>"/>
++		  <input type="text" name="domain" class="textbox" value="<?php echo $conf['auth']['exch_domain']?>"/>
+ 		</td>
+ 	  </tr>
+ 	  <?php }
+ 	  if ($conf['app']['selectLanguage']) { ?>
+ 	  <tr bgcolor="#FFFFFF">
+ 		<td>
+-		  <p><b><?=translate('Language')?></b></p>
++		  <p><b><?php echo translate('Language')?></b></p>
+ 		</td>
+ 		<td>
+-		<?CmnFns::print_language_pulldown()?>
++		<?php CmnFns::print_language_pulldown()?>
+ 		</td>
+ 	  </tr>
+ 	  <?php } ?>
+ 	  <tr bgcolor="#FFFFFF">
+ 		<td>
+-		  <p><b><?=translate('Keep me logged in')?></b></p>
++		  <p><b><?php echo translate('Keep me logged in')?></b></p>
+ 		</td>
+ 		<td>
+ 		  <input type="checkbox" name="setCookie" value="true" />
+@@ -84,8 +84,8 @@ function printLoginForm($msg = '', $resume = '') {
+ 	  <tr bgcolor="#FAFAFA">
+ 		<td colspan="2" style="border-top: solid 1px #CCCCCC;">
+ 		   <p align="center">
+-			<input type="submit" name="login" value="<?=translate('Log In')?>" class="button" />
+-			<input type="hidden" name="resume" value="<?=$resume?>" />
++			<input type="submit" name="login" value="<?php echo translate('Log In')?>" class="button" />
++			<input type="hidden" name="resume" value="<?php echo $resume?>" />
+ 		  </p>
+ 		</td>
+ 	  </tr>
+@@ -94,9 +94,9 @@ function printLoginForm($msg = '', $resume = '') {
+ </tr>
+ </table>
+ <p align="center">
+-<? $link->doLink('javascript: help();', translate('Help'), '', '', translate('Get online help')) ?>
++<?php $link->doLink('javascript: help();', translate('Help'), '', '', translate('Get online help')) ?>
+ </p>
+ </form>
+-<?
++<?php
+ }
+ ?>
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() {
+       <table width="100%" border="0" cellspacing="0" cellpadding="0">
+         <tr>
+           <td class="tableTitle" style="background-color:#0F93DF;">
+-		    <?=translate('My Quick Links')?>
++		    <?php echo translate('My Quick Links')?>
+ 		  </td>
+           <td class="tableTitle" style="background-color:#0F93DF;"><div align="right">
+-              <? $link->doLink("javascript: help('quick_links');", '?', '', 'color: #FFFFFF', translate('Help') . ' - ' . translate('My Quick Links')) ?>
++              <?php $link->doLink("javascript: help('quick_links');", '?', '', 'color: #FFFFFF', translate('Help') . ' - ' . translate('My Quick Links')) ?>
+             </div>
+           </td>
+         </tr>
+@@ -58,12 +58,12 @@ function showQuickLinks() {
+       <table width="100%" border="0" cellspacing="0" cellpadding="0">
+         <tr style="padding: 5px;" class="cellColor">
+           <td colspan="2">
+-		<? echo "Quarantine Summary" == $_SESSION['sessionNav'] ? 
++		<?php echo "Quarantine Summary" == $_SESSION['sessionNav'] ? 
+ 			' <p class="selectedLink"><b>&raquo;</b>':
+ 			" <p><b>&#8250;</b>\t";
+               	$link->doLink('summary.php', translate('Quarantine Summary')) ?>
+             	</p>
+-		<? echo "My Quarantine" == $_SESSION['sessionNav'] ? 
++		<?php echo "My Quarantine" == $_SESSION['sessionNav'] ? 
+ 			' <p class="selectedLink"><b>&raquo;</b>':
+ 			" <p><b>&#8250;</b>\t";
+               	$link->doLink('messagesIndex.php?ctype=A', translate('My Quarantine'));
+@@ -78,7 +78,7 @@ function showQuickLinks() {
+ 		?>
+             	</p>
+ 		<br>
+-		<? if (Auth::isMailAdmin()) {
++		<?php if (Auth::isMailAdmin()) {
+ 		     if ($conf['app']['siteSummary']) {
+   		       echo "Site Quarantine Summary" == $_SESSION['sessionNav'] ? 
+ 		  	  ' <p class="selectedLink"><b>&raquo;</b>':
+@@ -108,11 +108,11 @@ function showQuickLinks() {
+ 		}
+ 		?>
+             	<p><b>&#8250;</b>
+-              	<? $link->doLink('javascript: help();', translate('Help')) ?>
++              	<?php $link->doLink('javascript: help();', translate('Help')) ?>
+             	</p>
+ 		<br>
+             	<p><b>&#8250;</b>
+-              	<? $link->doLink('index.php?logout=true', translate('Log Out')) ?>
++              	<?php $link->doLink('index.php?logout=true', translate('Log Out')) ?>
+             	</p>
+           </td>
+         </tr>
+@@ -120,7 +120,7 @@ function showQuickLinks() {
+     </td>
+   </tr>
+ </table>
+-<?
++<?php
+ }
+ 
+ /**
+@@ -164,14 +164,14 @@ function startQuickLinksCol() {
+ <table width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td style="vertical-align:top; width:16%; border:solid 2px #0F93DF; background-color:#FFFFFF;">
+-<? 
++<?php
+ }
+ 
+ function startDataDisplayCol() {
+ ?>
+ </td>
+ <td style="padding-left:5px; vertical-align:top;">
+-<?
++<?php
+ }
+ 
+ function endDataDisplayCol() {
+@@ -179,7 +179,7 @@ function endDataDisplayCol() {
+ </td>
+ </tr>
+ </table>
+-<?
++<?php
+ }
+ 
+ /**
+@@ -191,7 +191,7 @@ function printActionButtons( $printDeleteAll = true ) 
+ ?>
+ <table width="100%" border="0" cellspacing="1" cellpadding="0">
+ <tr>
+-<? 
++<?php
+ 	echo "<td align=\"left\"><input type=\"submit\" class=\"button\" name=\"action\" value=\"";
+ 	if ($_SESSION['sessionNav'] == "My Pending Requests") {
+ 		echo ( Auth::isMailAdmin() ? translate('Release') : translate('Cancel Request') );
+@@ -201,14 +201,14 @@ function printActionButtons( $printDeleteAll = true ) 
+ 	}
+ 	echo "\"></td>";
+ ?>
+-	<td align="right"><input type="submit" class="button" name="action" value="<? echo translate('Delete'); ?>">
+-<? 	if ( $printDeleteAll )
++	<td align="right"><input type="submit" class="button" name="action" value="<?php echo translate('Delete'); ?>">
++<?php 	if ( $printDeleteAll )
+ 		echo "<input type=\"submit\" class=\"button\" name=\"action\" value=\"".translate('Delete All')."\">";
+ ?>
+ 	</td>
+ </tr>
+ </table>
+-<?
++<?php
+ }
+ 
+ /**
+@@ -223,17 +223,17 @@ function printReportButtons( $query_string, $error_arr
+ <form name="error_report_form" action="sendErrorReport.php" method="POST">
+ <table width="100%" border="0" cellspacing="1" cellpadding="0">
+ <tr>
+-	<input type="hidden" name="query_string" value="<? echo $query_string; ?> ">
+-	<input type="hidden" name="serialized_error_array" value="<? echo $serialized_error_array; ?>">
+-	<input type="hidden" name="process_action" value="<? echo $process_action ;?>">
++	<input type="hidden" name="query_string" value="<?php echo $query_string; ?> ">
++	<input type="hidden" name="serialized_error_array" value="<?php echo $serialized_error_array; ?>">
++	<input type="hidden" name="process_action" value="<?php echo $process_action ;?>">
+ 	<td><center>
+-		<input type="submit" class="button" name="action" value="<? echo translate('Send report and go back'); ?>">&nbsp;
+-		<input type="submit" class="button" name="action" value="<? echo translate('Go back'); ?>">
++		<input type="submit" class="button" name="action" value="<?php echo translate('Send report and go back'); ?>">&nbsp;
++		<input type="submit" class="button" name="action" value="<?php echo translate('Go back'); ?>">
+ 	</center></td>
+ </tr>
+ </table>
+ </form>
+-<?
++<?php
+ }
+ 
+ /**
+@@ -243,10 +243,10 @@ function printReportButtons( $query_string, $error_arr
+ function printMessage($message) {
+ 	$id = urlencode($message);
+ ?>
+-	<div align="center" id="<? echo $id; ?>" style="display:block;">
+-		<H4><? echo $message; ?></H4>
++	<div align="center" id="<?php echo $id; ?>" style="display:block;">
++		<H4><?php echo $message; ?></H4>
+ 	</div>
+-<? 
++<?php 
+ 	ob_flush();
+ 	flush();
+ }
diff --git a/security/mailzu/files/patch-templates_sendmail.template.php b/security/mailzu/files/patch-templates_sendmail.template.php
new file mode 100644
index 000000000000..71f64bfba442
--- /dev/null
+++ b/security/mailzu/files/patch-templates_sendmail.template.php
@@ -0,0 +1,44 @@
+--- templates/sendmail.template.php.orig	2007-06-14 19:00:15 UTC
++++ templates/sendmail.template.php
+@@ -19,7 +19,7 @@ function printsendmail(){
+ 		<table width="100%" border="0" cellspacing="1" cellpadding="0">
+                                 <tr>
+                                 <td class="tableTitle">
+-				<? 
++				<?php 
+ 				$adminEmail = $conf['app']['adminEmail'];
+ 				$emailList = '';
+ 				if ( is_array($adminEmail) ) {
+@@ -35,7 +35,7 @@ function printsendmail(){
+ 				</td>
+ 				<td class="tableTitle">
+                                 <div align="right">
+-                                        <? $link->doLink('javascript: help(\'msg_index\');', '?', '', 'color: #FFFFFF;',
++                                        <?php $link->doLink('javascript: help(\'msg_index\');', '?', '', 'color: #FFFFFF;',
+                                                 translate('Help') . ' - ' . translate('Email Administrator')) ?>
+                                 </div>
+                                 </td>
+@@ -45,11 +45,11 @@ function printsendmail(){
+ 		<table class="stdFont" width="100%" height="100%" border="0" cellspacing="1" cellpadding="0">
+ 
+ 			<tr class="cellColor" align="left">
+-			<form name="sendmail_to_admin_form" action="<? echo $_SERVER['PHP_SELF']; ?>" method="POST">
++			<form name="sendmail_to_admin_form" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
+ 			<td><br />
+-			&nbsp;&nbsp;<? echo translate('Subject') . ": " ;?><br />
++			&nbsp;&nbsp;<?php echo translate('Subject') . ": " ;?><br />
+ 			&nbsp;&nbsp;<input name="subject" type="text" size="60"><br /><br />
+-			&nbsp;&nbsp;<? echo translate('Message') . ": " ;?><br />
++			&nbsp;&nbsp;<?php echo translate('Message') . ": " ;?><br />
+ 			&nbsp;&nbsp;<textarea name="body" cols="60" rows="15"></textarea><br/>
+ 			&nbsp;&nbsp;<input type="submit" class="button" name="action" value="send"><br /><br />
+ 			</form>
+@@ -60,7 +60,7 @@ function printsendmail(){
+ 		</tr>
+ 	</table>
+ 
+-<?
++<?php
+ }
+ 
+ 
diff --git a/security/mailzu/files/patch-templates_summary.template.php b/security/mailzu/files/patch-templates_summary.template.php
new file mode 100644
index 000000000000..bc864aae1e04
--- /dev/null
+++ b/security/mailzu/files/patch-templates_summary.template.php
@@ -0,0 +1,64 @@
+--- templates/summary.template.php.orig	2007-06-14 19:00:15 UTC
++++ templates/summary.template.php
+@@ -33,12 +33,12 @@ function showSummary($count_array) {
+       		<table width="100%" border="0" cellspacing="1" cellpadding="0">
+         		<tr>
+ 			<td colspan="5" class="tableTitle">
+-			<? echo translate($_SESSION['sessionNav']); ?> 
++			<?php echo translate($_SESSION['sessionNav']); ?> 
+ 			</td>
+ 
+         		<td class="tableTitle">
+             		<div align="right">
+-              			<? $link->doLink('javascript: help(\'msg_summary\');', '?', '', 'color: #FFFFFF;',
++              			<?php $link->doLink('javascript: help(\'msg_summary\');', '?', '', 'color: #FFFFFF;',
+ 					translate('Help') . ' - ' . translate($_SESSION['sessionNav'])) ?>
+             		</div>
+         		</td>
+@@ -52,29 +52,29 @@ function showSummary($count_array) {
+ 				<!-- Print table's headers -->
+         <tr class="rowHeaders">
+ 					<td width="15%">
+-						<? echo translate('Date'); ?>
++						<?php echo translate('Date'); ?>
+ 					</td>
+ 					<td width="14%">
+-						<? echo translate('Spam'); ?>
++						<?php echo translate('Spam'); ?>
+ 					</td>
+        		<td width="14%">
+-						<? echo translate('Banned'); ?>
++						<?php echo translate('Banned'); ?>
+ 					</td>
+        		<td width="14%">
+- 						<? echo translate('Viruses'); ?>
++ 						<?php echo translate('Viruses'); ?>
+ 					</td>
+        		<td width="14%">
+- 						<? echo translate('Bad Headers'); ?>
++ 						<?php echo translate('Bad Headers'); ?>
+ 					</td>
+        		<td width="14%">
+- 						<? echo translate('Pending Requests'); ?>
++ 						<?php echo translate('Pending Requests'); ?>
+ 					</td>
+        		<td width="15%">
+- 						<? echo translate('Total'); ?>
++ 						<?php echo translate('Total'); ?>
+ 					</td>
+    			</tr>
+ 			
+-			<?  $i = 0;
++			<?php  $i = 0;
+ 					foreach ($count_array as $key => $val) { 
+ 						echo '<tr class="' . 'cellColor' . ($i++%2) . ' align="center">';
+ 						echo ($key == 'Total' ? '<td class="rowTotals">' : '<td class="rowNumValues">') . "$key</td> \n";
+@@ -89,7 +89,7 @@ function showSummary($count_array) {
+ 		</td>
+ 		</tr>
+ 	</table>
+-<? 
++<?php 
+ }
+ 
+ ?>
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() {
+       <table width="100%" border="0" cellspacing="0" cellpadding="0">
+         <tr>
+           <td class="tableTitle" style="background-color:#0F93DF;">
+-            <? echo translate('Message'); ?>
++            <?php echo translate('Message'); ?>
+           </td>
+           <td class="tableTitle" style="background-color:#0F93DF;">
+             <div align="right"
+@@ -34,7 +34,7 @@ function startMessage() {
+           </td>
+         </tr>
+       </table>
+-<?
++<?php
+ }
+ 
+ function endMessage() {
+@@ -42,7 +42,7 @@ function endMessage() {
+     </td>
+   </tr>
+ </table>
+-<?
++<?php
+ }
+ 
+ /**
+@@ -116,17 +116,17 @@ function MsgDisplayOptions($mail_id, $recip_email) {
+ <table class="stdFont" width="100%">
+   <tr>
+     <td align="left">
+-      <a href="javascript: history.back();">&#8249;&#8249; <? echo translate('BackMessageIndex'); ?> </a>
++      <a href="javascript: history.back();">&#8249;&#8249; <?php echo translate('BackMessageIndex'); ?> </a>
+     </td>
+     <td align="right">
+-      <a href="javascript: ViewOriginal('<? echo $enc_mail_id ?>','<? echo $enc_recip_email ?>');"> <? echo translate('ViewOriginal'); ?></a>
++      <a href="javascript: ViewOriginal('<?php echo $enc_mail_id ?>','<?php echo $enc_recip_email ?>');"> <?php echo translate('ViewOriginal'); ?></a>
+       |
+       <a href="javascript: void(1);" onclick="showHideFullHeaders('headers');">
+-   	      <? echo translate('ToggleHeaders'); ?></a>
++   	      <?php echo translate('ToggleHeaders'); ?></a>
+      </td>
+   </tr>
+ </table>
+-<?
++<?php
+ }
+ 
+ /**
+@@ -138,14 +138,14 @@ function MsgOriginalOptions() {
+   <table width="100%">
+    <tr>
+     <td class="stdFont" align="right">
+-      <a href="javascript: window.print();"> <? echo translate('Print'); ?></a>
++      <a href="javascript: window.print();"> <?php echo translate('Print'); ?></a>
+        |
+-      <a href="javascript: window.close();"> <? echo translate('CloseWindow'); ?> </a>
++      <a href="javascript: window.close();"> <?php echo translate('CloseWindow'); ?> </a>
+     </td>
+    </tr>
+     <tr>
+      <td class="stdFont" bgcolor="#FAFAFA">
+-<?
++<?php
+ }
+ 
+ 
diff --git a/security/mailzu/files/pkg-message.in b/security/mailzu/files/pkg-message.in
index 7a59acf86e62..b8dcdf25b84a 100644
--- a/security/mailzu/files/pkg-message.in
+++ b/security/mailzu/files/pkg-message.in
@@ -9,11 +9,6 @@ Please read: %%DOCSDIR%%/INSTALL
 
 Then, edit %%WWWDIR%%/config/config.php
 
-Also, please note that MailZu needs PHP's short_open_tag
-boolean to be "on" (this is detault in typical installations
-of PHP). To be certain, you can set "short_open_tag = on" in
-%%LOCALBASE%%/etc/php.ini.
-
 Finally, make MailZu available through your web site.  An
 example for httpd.conf:
 
@@ -26,6 +21,24 @@ Alias /mailzu/ "%%WWWDIR%%/"
     Deny from all
     Allow from 127.0.0.1 .example.org
 </Directory>
+
+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
 }
 ]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108091648.179GmlKY021879>