summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-02-05 23:34:18 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-02-05 23:34:18 +0000
commit8a0afcbc33c19b304ed360f51a3604cc992eb94e (patch)
tree17b5ca29b5774f85e7e3184864fad6c361a30d9c /roundcubemail/program/steps/mail
parentfb0b4a6e4e836ec723db82975ac2101cdee67a91 (diff)
Applied patch to prevent bad header delimiters (#1484751)
git-svn-id: https://svn.roundcube.net/trunk@1022 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail')
-rw-r--r--roundcubemail/program/steps/mail/sendmail.inc9
1 files changed, 5 insertions, 4 deletions
diff --git a/roundcubemail/program/steps/mail/sendmail.inc b/roundcubemail/program/steps/mail/sendmail.inc
index 869ed6e87..8ead1b0e0 100644
--- a/roundcubemail/program/steps/mail/sendmail.inc
+++ b/roundcubemail/program/steps/mail/sendmail.inc
@@ -206,11 +206,12 @@ if (!empty($_POST['_receipt']))
// additional headers
$headers['Message-ID'] = $message_id;
$headers['X-Sender'] = $from;
-$headers['Received'] = 'from '.
+$headers['Received'] = wordwrap('from ' .
(isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
- gethostbyaddr($_SERVER['HTTP_X_FORWARDED_FOR']).' ['.$_SERVER['HTTP_X_FORWARDED_FOR']."]\r\n\tvia " : '').
- gethostbyaddr($_SERVER['REMOTE_ADDR']).' ['.$_SERVER['REMOTE_ADDR']."]\r\n\t with ".
- $_SERVER['SERVER_PROTOCOL'].' ('.$_SERVER['REQUEST_METHOD'].'); '.date('r');
+ gethostbyaddr($_SERVER['HTTP_X_FORWARDED_FOR']).' ['.$_SERVER['HTTP_X_FORWARDED_FOR'].'] via ' : '') .
+ gethostbyaddr($_SERVER['REMOTE_ADDR']).' ['.$_SERVER['REMOTE_ADDR'].'] with ' .
+ $_SERVER['SERVER_PROTOCOL'].' ('.$_SERVER['REQUEST_METHOD'].'); ' . date('r'),
+ 69, rcmail_header_delm() . "\t");
if (!empty($CONFIG['useragent']))
$headers['User-Agent'] = $CONFIG['useragent'];