From 98e0a0d2c56a06d3d82ca9cf4578865a821d9baf Mon Sep 17 00:00:00 2001 From: Matthew Noorenberghe Date: Sat, 9 Feb 2019 02:16:37 -0800 Subject: [PATCH] Don't output Fatal(...) error messages unless debugging is on to avoid leaking info. Fixes #2459 --- web/includes/logger.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/includes/logger.php b/web/includes/logger.php index 8bc81fb97..b3048bc1a 100644 --- a/web/includes/logger.php +++ b/web/includes/logger.php @@ -455,7 +455,10 @@ function Error( $string ) { function Fatal( $string ) { Logger::fetch()->logPrint( Logger::FATAL, $string ); - die( htmlentities($string) ); + if (Logger::fetch()->debugOn()) { + echo(htmlentities($string)); + } + exit(1); } function Panic( $string ) {