diff options
author | Urban Müller | 2023-09-05 14:36:40 +0200 |
---|---|---|
committer | Urban Müller | 2023-09-05 14:36:40 +0200 |
commit | 134f733834cf57812fefdb0d24784b26487d8b7a (patch) | |
tree | 7038a764b46793b040c14444c61a5903cfa44bef | |
parent | 842deaadc3d8e16a118da1c68cbb5a3eb3d4849d (diff) | |
download | itools-134f733834cf57812fefdb0d24784b26487d8b7a.tar.gz itools-134f733834cf57812fefdb0d24784b26487d8b7a.tar.bz2 itools-134f733834cf57812fefdb0d24784b26487d8b7a.zip |
protect against huge stackdumps from outdooractive
-rw-r--r-- | it.class | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -292,7 +292,7 @@ static function error($p = array(), $extra = null) { $trace = $p['trace'] ?: array_slice(debug_backtrace(0), $p['backtraceskip']); $mediumstack = it_debug::backtrace(['trace' => $trace, 'format' => "medium"]); - $longstack = it_debug::backtrace(['trace' => $trace, 'format' => "long"]); + $longstack = substr(it_debug::backtrace(['trace' => $trace, 'format' => "long"]), 0, 200000); # use substr() because data might be binary $reqbody = it::file_get_contents("php://input"); $body .= ($traceline and $t = it::exec('grep -h {0} `ls 2>/dev/null {1}/log/alertlog-*|tail -3` /dev/null 2>/dev/null | grep ^2 | cut -d : -f 1-2 | sort | uniq -c | tail -10', $traceline, $home)) ? "Histogram: (last 10 affected minutes in 3 days)\n$t\n" : ""; |