From 930fbe1c28c1bd7b1a5f58c66ccd94e1caac0e5c Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Mon, 16 Mar 2020 21:15:04 -0400 Subject: [PATCH] Simplified debug_backtrace This removed arguments (which could contain sensitive data) and also eliminated resources from the trace which failed to json_encode. --- api/cora/request.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/cora/request.php b/api/cora/request.php index c625a5a..a9c3981 100644 --- a/api/cora/request.php +++ b/api/cora/request.php @@ -432,7 +432,7 @@ final class request { $this->error_detail['file'] = $error_file; $this->error_detail['line'] = $error_line; - $this->error_detail['trace'] = debug_backtrace(false); + $this->error_detail['trace'] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); try { $database = database::get_instance(); $this->error_detail['queries'] = $database->get_queries(); @@ -589,7 +589,7 @@ final class request { $this->error_detail['file'] = $error['file']; $this->error_detail['line'] = $error['line']; - $this->error_detail['trace'] = debug_backtrace(false); + $this->error_detail['trace'] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); try { $database = database::get_instance(); $this->error_detail['queries'] = $database->get_queries();