summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_imap.php3
-rw-r--r--program/include/rcube_imap_generic.php2
-rw-r--r--program/include/rcube_ldap.php2
3 files changed, 4 insertions, 3 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index dca8961fa..1d258f1e1 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -2491,6 +2491,9 @@ class rcube_imap
return true;
}
+ // Remove NULL characters (#1486189)
+ $body = str_replace("\x00", '', $body);
+
// convert charset (if text or message part)
if ($body && !$skip_charset_conv &&
preg_match('/^(text|message)$/', $o_part->ctype_primary)
diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php
index 102845ed0..647fd96b5 100644
--- a/program/include/rcube_imap_generic.php
+++ b/program/include/rcube_imap_generic.php
@@ -2387,8 +2387,6 @@ class rcube_imap_generic
} else if ($mode == 2) {
$line = rtrim($line, "\t\r\0\x0B");
$line = quoted_printable_decode($line);
- // Remove NULL characters (#1486189)
- $line = str_replace("\x00", '', $line);
// UUENCODE
} else if ($mode == 3) {
$line = rtrim($line, "\t\r\n\0\x0B");
diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php
index 699691d87..373670ab0 100644
--- a/program/include/rcube_ldap.php
+++ b/program/include/rcube_ldap.php
@@ -685,8 +685,8 @@ class rcube_ldap extends rcube_addressbook
} // end foreach
// Verify that the required fields are set.
+ $missing = null;
foreach ($this->prop['required_fields'] as $fld) {
- $missing = null;
if (!isset($newentry[$fld])) {
$missing[] = $fld;
}