Ticket #1484916 (closed Patches: fixed)
Problem with line with a space at the end
| Reported by: | the_glu | Owned by: | |
|---|---|---|---|
| Priority: | 2 | Milestone: | 0.2-alpha |
| Component: | IMAP connection | Version: | 0.1-stable |
| Severity: | major | Keywords: | |
| Cc: |
Description
When there is a space at the end in the message's body, he is removed when the message is showed in roundcube.
In thunderbird, the space is still there. So I think there is a problem with imap classes, who shouldn't remove them.
Patch :
Index: roundcubemail/program/lib/imap.inc
===================================================================
--- roundcubemail/program/lib/imap.inc (révision 1211)
+++ roundcubemail/program/lib/imap.inc (copie de travail)
@@ -2354,15 +2354,14 @@
$remaining = $bytes - $received;
$line = iil_ReadLine($fp, 1024);
$len = strlen($line);
-
if ($len > $remaining) {
$line = substr($line, 0, $remaining);
}
$received += strlen($line);
if ($mode == 1) {
- $result .= chop($line) . "\n";
+ $result .= rtrim($line,"\n\r\0\t\x0B") . "\n";
} else if ($mode == 2) {
- echo chop($line) . "\n"; flush();
+ echo rtrim($line,"\n\r\0\t\x0B") . "\n"; flush();
} else if ($mode == 3) {
echo base64_decode($line); flush();
}
@@ -2374,7 +2373,7 @@
} while (!iil_StartsWith($line, $key));
if ($result) {
- $result = chop($result);
+ $result = rtrim($result,"\n\r\0\t\x0B");
return $result; // substr($result, 0, strlen($result)-1);
}
return false;
This fix #1484053. but I maybe another problems could happen (attachments ?)
Change History
Note: See
TracTickets for help on using
tickets.
