From 77c28206a14b5bee3f3091f10cffd531bce5649c Mon Sep 17 00:00:00 2001
From: yllar <yllar.pajus@gmail.com>
Date: Sat, 16 Dec 2006 13:25:16 -0500
Subject: [PATCH] updated ja and fr translations

---
 program/lib/imap.inc |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/program/lib/imap.inc b/program/lib/imap.inc
index b2e1d43..6bc47a1 100644
--- a/program/lib/imap.inc
+++ b/program/lib/imap.inc
@@ -39,6 +39,7 @@
 		- Added BCC and REFERENCE to the list of headers to fetch in iil_C_FetchHeaders()
 		- Leave messageID unchanged in iil_C_FetchHeaders()
 		- Avoid stripslahes in iil_Connect()
+		- Escape quotes and backslashes in iil_C_Login()
 		- Added patch to iil_SortHeaders() by Richard Green
 		- Removed <br> from error messages (better for logging)
 		- Added patch to iil_C_Sort() enabling UID SORT commands
@@ -225,8 +226,9 @@
 
 function iil_C_Login(&$conn, $user, $password){
 
+    $password = strtr($password, array('"'=>'\\"', '\\' => '\\\\'));  
     fputs($conn->fp, "a001 LOGIN $user \"$password\"\r\n");
-		
+
 	do{
 	    $line = iil_ReadReply($conn->fp);
 	}while(!iil_StartsWith($line, "a001 "));
@@ -1887,7 +1889,7 @@
                 $remaining = $bytes - $received;
                 $line = iil_ReadLine($fp, 1024);
                 $len = strlen($line);
-                if ($len > $remaining) substr($line, 0, $remaining);
+                if ($len > $remaining) $line = substr($line, 0, $remaining);
                 $received += strlen($line);
                 if ($mode==1) $result .= chop($line)."\n";
                 else if ($mode==2){ echo chop($line)."\n"; flush(); }

--
Gitblit v1.9.1