summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-09-02 12:47:48 +0000
committeralecpl <alec@alec.pl>2008-09-02 12:47:48 +0000
commit76265efa7311a909029713b117230f94cdd4bbab (patch)
tree5bd2719d9727e04ff7eb864ef7f81a670b6e930b
parent11ef977d13ce87390074591b1dded0796ffeefcd (diff)
- last change fix
-rw-r--r--program/lib/imap.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/program/lib/imap.inc b/program/lib/imap.inc
index 9402dfb4f..a2564de87 100644
--- a/program/lib/imap.inc
+++ b/program/lib/imap.inc
@@ -298,7 +298,7 @@ function iil_Escape($string)
function iil_C_GetCapability(&$conn, $name)
{
if (in_array($name, $conn->capability)) {
- return $conn->capability[$name];
+ return true;
}
else if ($conn->capability_readed) {
return false;
@@ -323,7 +323,7 @@ function iil_C_GetCapability(&$conn, $name)
$conn->capability_readed = true;
if (in_array($name, $conn->capability)) {
- return $conn->capability[$name];
+ return true;
}
return false;
@@ -548,13 +548,15 @@ function iil_Connect($host, $user, $password) {
}
$iil_error .= "Socket connection established\r\n";
- $line = iil_ReadLine($conn->fp, 1024);
+ $line = iil_ReadLine($conn->fp, 4096);
// RFC3501 [7.1] optional CAPABILITY response
if (preg_match('/\[CAPABILITY ([^]]+)\]/i', $line, $matches)) {
$conn->capability = explode(' ', strtoupper($matches[1]));
}
+ $conn->message .= $line;
+
if (strcasecmp($auth_method, "check") == 0) {
//check for supported auth methods
if (iil_C_GetCapability($conn, 'AUTH=CRAM-MD5') || iil_C_GetCapability($conn, 'AUTH=CRAM_MD5')) {