From 99bd6cb3a4e967c1d7c4842922f86322a4440fdb Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Mon, 15 Sep 2008 22:39:10 +0000 Subject: Restrict alert mail subject to a reasonable size --- it.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'it.class') 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 "
{$p['title']}\n".rtrim($body).""; -- cgit v1.2.3