summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_imap_generic.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-10-23 11:09:35 +0200
committerAleksander Machniak <alec@alec.pl>2014-10-23 11:11:59 +0200
commit4efc69e7fda33f9c69285f1a4f2cd0aaac160bb3 (patch)
treefc4dc062a7315e9732d5a0fef50ba6e51852a757 /program/lib/Roundcube/rcube_imap_generic.php
parent793642ed76b5c26487136d2b547178e067afe113 (diff)
Fix handling of base64-encoded attachments with extra spaces (#1490111)
Diffstat (limited to 'program/lib/Roundcube/rcube_imap_generic.php')
-rw-r--r--program/lib/Roundcube/rcube_imap_generic.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php
index 2690cbd5a..96173d317 100644
--- a/program/lib/Roundcube/rcube_imap_generic.php
+++ b/program/lib/Roundcube/rcube_imap_generic.php
@@ -2636,7 +2636,7 @@ class rcube_imap_generic
// BASE64
if ($mode == 1) {
- $line = rtrim($line, "\t\r\n\0\x0B");
+ $line = preg_replace('|[^a-zA-Z0-9+=/]|', '', $line);
// create chunks with proper length for base64 decoding
$line = $prev.$line;
$length = strlen($line);