diff options
author | Nathan Gass | 2021-12-14 14:36:38 +0100 |
---|---|---|
committer | Nathan Gass | 2021-12-14 14:36:52 +0100 |
commit | b15cb031133adbe1e5356d3e3be4b50d9d436cd5 (patch) | |
tree | 0bd4852b11c3749f00c3b5b63bfadcef6b0e3c4f /it.class | |
parent | 40cc2656a5c1df52dc70e93c14b38d64e9422c0c (diff) | |
download | itools-b15cb031133adbe1e5356d3e3be4b50d9d436cd5.tar.gz itools-b15cb031133adbe1e5356d3e3be4b50d9d436cd5.tar.bz2 itools-b15cb031133adbe1e5356d3e3be4b50d9d436cd5.zip |
it::error: handle binary body like long body by saving in tmp
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -259,7 +259,7 @@ static function error($p = array(), $extra = null) if ($toscreen || $sendmail) { $p['body'] = is_string($p['body']) || !array_key_exists('body', $p) ? $p['body'] : var_export($p['body'], true); - if (strlen($p['body']) > 500000) + if (strlen($p['body']) > 500000 || it::match('[\x00-\x08\x0B-\x1F]', $p['body']) !== null) { file_put_contents($datafn = "/tmp/alertdata/error-" . substr(md5($p['body']), 0, 2), $p['body']); # NOPHPLINT $p['body'] = "Body: " . getenv('HOSTNAME') . ":$datafn"; |