summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it.class b/it.class
index 5f66c70..d97ce91 100644
--- a/it.class
+++ b/it.class
@@ -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";