Explorar o código

Remove NUL characters in case of text and message parts.

stekkel %!s(int64=20) %!d(string=hai) anos
pai
achega
f1f8c4b41e
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      class/deliver/Deliver.class.php

+ 2 - 0
class/deliver/Deliver.class.php

@@ -133,6 +133,8 @@ class Deliver {
         case 'message':
             if ($message->body_part) {
                 $body_part = $message->body_part;
+                // remove NUL characters
+                $body_part = str_replace("\0",'',$body_part);
                 $length += $this->clean_crlf($body_part);
                 if ($stream) {
                     $this->preWriteToStream($body_part);