From 08e6b47b22f3f97035ac48980bccc43f98e54f4f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 15 Nov 2022 10:38:49 +0100 Subject: [PATCH] Do not attempt to sanitize the path to `[internal function]` This looks ugly and leaks some information: How deep WoltLab Suite Core is location within the file system hierarchy. --- wcfsetup/install/files/lib/core.functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wcfsetup/install/files/lib/core.functions.php b/wcfsetup/install/files/lib/core.functions.php index 636ef67636..39910c3e27 100644 --- a/wcfsetup/install/files/lib/core.functions.php +++ b/wcfsetup/install/files/lib/core.functions.php @@ -869,6 +869,10 @@ EXPLANATION; */ function sanitizePath(string $path, bool $removePath = true): string { + if ($path === '[internal function]') { + return $path; + } + if (!$removePath && WCF::debugModeIsEnabled() && defined('EXCEPTION_PRIVACY') && EXCEPTION_PRIVACY === 'public') { return $path; } -- 2.20.1