summaryrefslogtreecommitdiff
path: root/program/lib
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-06-02 18:12:36 +0000
committeralecpl <alec@alec.pl>2009-06-02 18:12:36 +0000
commit07f0b943380210a6366c62728927314ec10fcfb6 (patch)
tree34d3d723f73c148a7da57005163c2c5b47c87b7f /program/lib
parent9489adc5936fd516f3f6df91cfce3697b36e2cf1 (diff)
- fix FETCH reply parsing (#1485891)
Diffstat (limited to 'program/lib')
-rw-r--r--program/lib/imap.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/lib/imap.inc b/program/lib/imap.inc
index 2954ecfe5..64f0325bd 100644
--- a/program/lib/imap.inc
+++ b/program/lib/imap.inc
@@ -1629,7 +1629,7 @@ function iil_C_FetchHeaders(&$conn, $mailbox, $message_set, $uidfetch=false, $bo
}
// the rest of the result
- preg_match('/ BODY\[HEADER.FIELDS \(.*\)\]\s*(.*)/s', $line, $m);
+ preg_match('/ BODY\[HEADER.FIELDS \(.*?\)\]\s*(.*)$/s', $line, $m);
$reslines = explode("\n", trim($m[1], '"'));
// re-parse (see below)
foreach ($reslines as $line) {
@@ -1686,7 +1686,7 @@ function iil_C_FetchHeaders(&$conn, $mailbox, $message_set, $uidfetch=false, $bo
$headers[$k] = '';
}
}
-
+
// create array with header field:data
while ( list($lines_key, $str) = each($lines) ) {
list($field, $string) = iil_SplitHeaderLine($str);