diff -r 9788f2b7e08a -r 218b6d4de908 ajax.php --- a/ajax.php Sat Mar 21 19:11:30 2009 -0400 +++ b/ajax.php Sun Mar 22 00:44:09 2009 -0400 @@ -187,9 +187,16 @@ if ( !isset($_POST['r']) ) die('Invalid request'); - $request = enano_json_decode($_POST['r']); - if ( !isset($request['src']) || !isset($request['summary']) || !isset($request['minor_edit']) || !isset($request['time']) || !isset($request['draft']) ) - die('Invalid request'); + try + { + $request = enano_json_decode($_POST['r']); + if ( !isset($request['src']) || !isset($request['summary']) || !isset($request['minor_edit']) || !isset($request['time']) || !isset($request['draft']) ) + die('Invalid request'); + } + catch(Zend_Json_Exception $e) + { + die("JSON parsing failed. View as HTML to see full report.\n

\n
" . htmlspecialchars(strval($e)) . "

Request:
" . htmlspecialchars($_POST['r']) . "
"); + } $time = intval($request['time']);