Skip to content

Commit

Permalink
Fix string replace with null (horde#3)
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <[email protected]>

Co-authored-by: Kieran <[email protected]>
  • Loading branch information
ChristophWurst and bytestream committed May 23, 2022
1 parent c6cb6f9 commit f04a388
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Horde/Mime/Headers/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ protected function _sanityCheck($data)
}

/* Ensure no null characters exist in header data. */
if ($data === null) {
return '';
}
return str_replace("\0", '', $data);
}

Expand Down

0 comments on commit f04a388

Please sign in to comment.