summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorUrban Müller2020-11-13 15:41:29 +0100
committerUrban Müller2020-11-13 15:41:29 +0100
commit39dbd947f59394fab9238f7faaab74390aa0b783 (patch)
tree8c8905489eacc7d8d6249fa27d2dbe2dda938268 /it.class
parent09cad1130aec877657331f750d4af43a610e7ff1 (diff)
downloaditools-39dbd947f59394fab9238f7faaab74390aa0b783.tar.gz
itools-39dbd947f59394fab9238f7faaab74390aa0b783.tar.bz2
itools-39dbd947f59394fab9238f7faaab74390aa0b783.zip
properly quote raw post data for httpreq.php
Diffstat (limited to 'it.class')
-rw-r--r--it.class4
1 files changed, 2 insertions, 2 deletions
diff --git a/it.class b/it.class
index 821b70d..0b48229 100644
--- a/it.class
+++ b/it.class
@@ -278,13 +278,13 @@ static function error($p = array(), $extra = null)
if ($level >= $p['backtraceskip'] && $tracesize < 100000 && ($tracesize += strlen(print_r($stackframe, true))) < 100000) # save mem
$stackframes[] = $stackframe;
- $needraw = $_SERVER['REQUEST_METHOD'] == "POST" && !it::match('application/x-www-form-urlencoded|multipart/form-data', $_SERVER['CONTENT_TYPE']);
+ $rawpost = $_SERVER['REQUEST_METHOD'] == "POST" && !it::match('application/x-www-form-urlencoded|multipart/form-data', $_SERVER['CONTENT_TYPE']) ? it::file_get_contents("php://input") : "";
$body .= ($trace and $t = it::exec('grep -h {0} `ls /tmp/alertdata/alertlog-*|tail -3` /dev/null 2>/dev/null | grep ^2 | cut -d : -f 1-2 | sort | uniq -c | tail -10', $trace)) ? "Histogram: (last 10 affected minutes in 3 days)\n$t" : "";
$body .= "\n";
$body .= $_GET ? "\$_GET: " . var_export($_GET, true) . "\n\n" : "";
$body .= $_POST ? "\$_POST: " . var_export($_POST, true) . "\n\n" : "";
- $body .= $needraw ? "\$rawpost: " . it::file_get_contents("php://input") . "\n\n" : "";
+ $body .= $rawpost ? "\$rawpost: " . var_export($rawpost, true) . "\n\n" : "";
$body .= $_COOKIE ? "\$_COOKIE: " . var_export($_COOKIE, true) . "\n\n" : "";
$body .= $_SERVER['REMOTE_ADDR'] ? "" : "Pstree:\n" . it::exec("pstree -als " . getmypid() . " | head -n -3") . "\n";
$body .= $_SERVER ? "\$_SERVER: " . var_export($_SERVER, true) . "\n\n" : "";