diff options
author | Christian Schneider | 2008-09-15 22:39:10 +0000 |
---|---|---|
committer | Christian Schneider | 2008-09-15 22:39:10 +0000 |
commit | 99bd6cb3a4e967c1d7c4842922f86322a4440fdb (patch) | |
tree | b466f8d67a18f1ab34c39ab4fbb2212208a49745 /it.class | |
parent | c6ce30d4f80e155e2caf6d24f8ac873fd760bb09 (diff) | |
download | itools-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.class | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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>"; |