diff options
author | Andrew Manning <tamanning@zoho.com> | 2018-03-05 20:06:47 -0500 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2018-03-05 20:06:47 -0500 |
commit | 9b13db1c4896e6a8b0a55195530f5449999e811d (patch) | |
tree | 0588de154eec12481cd56e448a0a682bb94341aa /include/items.php | |
parent | 058f7277b52bdcdb80dc3e28bf0ec93a573195a7 (diff) | |
parent | c462d2f15eb2d463706403676b00bbd7bd111443 (diff) | |
download | volse-hubzilla-9b13db1c4896e6a8b0a55195530f5449999e811d.tar.gz volse-hubzilla-9b13db1c4896e6a8b0a55195530f5449999e811d.tar.bz2 volse-hubzilla-9b13db1c4896e6a8b0a55195530f5449999e811d.zip |
Merge branch 'dev' into oauth2
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php index 790b91c88..50f663836 100755 --- a/include/items.php +++ b/include/items.php @@ -1412,6 +1412,13 @@ function get_mail_elements($x) { } else { $arr['body'] = (($x['body']) ? htmlspecialchars($x['body'], ENT_COMPAT,'UTF-8',false) : ''); + + $maxlen = get_max_import_size(); + + if($maxlen && mb_strlen($arr['body']) > $maxlen) { + $arr['body'] = mb_substr($arr['body'],0,$maxlen,'UTF-8'); + logger('message length exceeds max_import_size: truncated'); + } } $arr['title'] = (($x['title'])? htmlspecialchars($x['title'],ENT_COMPAT,'UTF-8',false) : ''); |