summaryrefslogtreecommitdiff
path: root/program/include/rcube_imap_generic.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-12-08 14:24:53 +0000
committeralecpl <alec@alec.pl>2010-12-08 14:24:53 +0000
commit4064452816e7e94b7a6dbc7b02cfc56d725408b2 (patch)
tree5fa1e5f2c69c74fa9793c8ecdcff5cdbb9060568 /program/include/rcube_imap_generic.php
parent90f81a6c8de5aecfa36c54cc5260d25ba883aa51 (diff)
- Fix handling of untagged responses for AUTHENTICATE command (#1487450)
Diffstat (limited to 'program/include/rcube_imap_generic.php')
-rw-r--r--program/include/rcube_imap_generic.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php
index b2346ba13..e72135328 100644
--- a/program/include/rcube_imap_generic.php
+++ b/program/include/rcube_imap_generic.php
@@ -282,7 +282,6 @@ class rcube_imap_generic
return $data;
}
- // don't use it in loops, until you exactly know what you're doing
function readReply(&$untagged=null)
{
do {
@@ -421,7 +420,7 @@ class rcube_imap_generic
}
$this->putLine($this->nextTag() . " AUTHENTICATE $type");
- $line = trim($this->readLine(1024));
+ $line = trim($this->readReply());
if ($line[0] == '+') {
$challenge = substr($line, 2);
@@ -471,7 +470,7 @@ class rcube_imap_generic
// send result
$this->putLine($reply);
- $line = $this->readLine(1024);
+ $line = trim($this->readReply());
if ($line[0] == '+') {
$challenge = substr($line, 2);
@@ -491,7 +490,7 @@ class rcube_imap_generic
$this->putLine('');
}
- $line = $this->readLine(1024);
+ $line = $this->readReply();
$result = $this->parseResult($line);
}
else { // PLAIN
@@ -513,7 +512,7 @@ class rcube_imap_generic
}
else {
$this->putLine($this->nextTag() . " AUTHENTICATE PLAIN");
- $line = trim($this->readLine(1024));
+ $line = trim($this->readReply());
if ($line[0] != '+') {
return $this->parseResult($line);
@@ -521,7 +520,7 @@ class rcube_imap_generic
// send result, get reply and process it
$this->putLine($reply);
- $line = $this->readLine(1024);
+ $line = $this->readReply();
$result = $this->parseResult($line);
}
}