Permalink
Browse files

[xoopsmailerlocal] filtering by `secureHeader` at function addrFormat()

  • Loading branch information...
nao-pon committed Jul 12, 2015
1 parent fac357a commit 3bfef36c104851260d33fc2f2ae9a5a3ccbfbb22
Showing with 13 additions and 11 deletions.
  1. +6 −5 html/language/ja_utf8/xoopsmailerlocal.php
  2. +7 −6 html/language/japanese/xoopsmailerlocal.php
@@ -121,17 +121,18 @@ function XoopsMultiMailerLocal() {
}
}
function AddrFormat($addr) {
function addrFormat($addr) {
if(empty($addr[1])) {
$formatted = $addr[0];
$formatted = $this->secureHeader($addr[0]);
} else {
$formatted = $this->EncodeHeader($addr[1], 'text') . " <" .
$addr[0] . ">";
$formatted = $this->EncodeHeader($this->secureHeader($addr[1]), 'text') . ' <' . $this->secureHeader(
$addr[0]
) . '>';
}
return $formatted;
}
function EncodeHeader ($str, $position = 'text', $force=false) {
function encodeHeader ($str, $position = 'text', $force=false) {
if (version_compare(PHP_VERSION, '4.4.1')>0) {
if (function_exists('mb_convert_encoding')) { //Use mb_string extension if exists.
if ($this->needs_encode || $force) {
@@ -1,5 +1,5 @@
<?php
// $Id: xoopsmailerlocal.php,v 1.4 2008/07/05 07:45:33 minahito Exp $
// $Id: xoopsmailerlocal.php,v 1.2 2008/09/21 06:36:10 minahito Exp $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
@@ -121,17 +121,18 @@ function XoopsMultiMailerLocal() {
}
}
function AddrFormat($addr) {
function addrFormat($addr) {
if(empty($addr[1])) {
$formatted = $addr[0];
$formatted = $this->secureHeader($addr[0]);
} else {
$formatted = $this->EncodeHeader($addr[1], 'text') . " <" .
$addr[0] . ">";
$formatted = $this->EncodeHeader($this->secureHeader($addr[1]), 'text') . ' <' . $this->secureHeader(
$addr[0]
) . '>';
}
return $formatted;
}
function EncodeHeader ($str, $position = 'text', $force=false) {
function encodeHeader ($str, $position = 'text', $force=false) {
if (version_compare(PHP_VERSION, '4.4.1')>0) {
if (function_exists('mb_convert_encoding')) { //Use mb_string extension if exists.
if ($this->needs_encode || $force) {

0 comments on commit 3bfef36

Please sign in to comment.