summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorChristian Schneider2008-09-15 22:39:10 +0000
committerChristian Schneider2008-09-15 22:39:10 +0000
commit99bd6cb3a4e967c1d7c4842922f86322a4440fdb (patch)
treeb466f8d67a18f1ab34c39ab4fbb2212208a49745 /it.class
parentc6ce30d4f80e155e2caf6d24f8ac873fd760bb09 (diff)
downloaditools-99bd6cb3a4e967c1d7c4842922f86322a4440fdb.tar.gz
itools-99bd6cb3a4e967c1d7c4842922f86322a4440fdb.tar.bz2
itools-99bd6cb3a4e967c1d7c4842922f86322a4440fdb.zip
Restrict alert mail subject to a reasonable size
Diffstat (limited to 'it.class')
-rw-r--r--it.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it.class b/it.class
index 57ae3ae..83532a8 100644
--- a/it.class
+++ b/it.class
@@ -210,7 +210,7 @@ function error($p = array(), $body = null, $to = null) # $body and $to deprecate
$body .= $fulltrace ? "Stack: " . print_r($fulltrace, true) . "\n\n" : "";
$body = it::replace(array('(pw|passw|password|secret)\] => .*' => '$1] => ********'), $body);
- it::mail(array('To' => $p['to'], 'Subject' => $p['title'], 'Body' => $body) + (($cc = $GLOBALS['it_defaultconfig']['error_cc']) ? array('Cc' => $cc) : array()));
+ it::mail(array('To' => $p['to'], 'Subject' => substr($p['title'], 0, 80), 'Body' => $body) + (($cc = $GLOBALS['it_defaultconfig']['error_cc']) ? array('Cc' => $cc) : array()));
}
else if ($_SERVER['REMOTE_ADDR']) # toscreen mode: web
echo "<pre>{$p['title']}\n".rtrim($body)."</pre>";