steffen: server/kolab-resource-handlers/kolab-resource-handlers/resmgr kolabmailtransport.php, 1.4, 1.5
cvs at intevation.de
cvs at intevation.de
Thu Dec 22 18:52:55 CET 2005
Author: steffen
Update of /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/resmgr
In directory doto:/tmp/cvs-serv15426/kolab-resource-handlers/resmgr
Modified Files:
kolabmailtransport.php
Log Message:
Fix for Issue1042 (dot-escaping bug)
Index: kolabmailtransport.php
===================================================================
RCS file: /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/resmgr/kolabmailtransport.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- kolabmailtransport.php 1 Jul 2005 11:59:45 -0000 1.4
+++ kolabmailtransport.php 22 Dec 2005 17:52:53 -0000 1.5
@@ -32,6 +32,7 @@
function start($sender,$recips) {
$this->createTransport();
$myclass = get_class($this->transport);
+ $this->got_newline = false;
if (!$this->transport) {
return new PEAR_Error('Failed to connect to $myclass: ' . $error->getMessage(), 421);
@@ -101,8 +102,10 @@
* Because a single leading period (.) signifies an end to the data,
* legitimate leading periods need to be "doubled" (e.g. '..').
*/
- if( $data[0] == '.' ) $data = '.'.$data;
+ if( $this->got_newline && $data[0] == '.' ) $data = '.'.$data;
$data = str_replace("\n.", "\n..", $data);
+ if( $data[count($data)] == "\n" ) $this->got_newline = true;
+ else $this->got_newline = false;
}
function data( $data) {
@@ -128,6 +131,7 @@
var $host;
var $port;
var $transport;
+ var $got_newline;
};
class KolabLMTP extends KolabMailTransport {
More information about the commits
mailing list