Do not attempt to sanitize the path to `[internal function]`
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 15 Nov 2022 09:38:49 +0000 (10:38 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 15 Nov 2022 09:38:49 +0000 (10:38 +0100)
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

index 636ef676361eab90e5e35e5245b77495510a10b4..39910c3e279b2dcff1c671bf8569c81bbe80496c 100644 (file)
@@ -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;
                }