From 7355935cdef66bf48805cc22f18c87ff123f6bc2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 12 Mar 2021 10:58:20 +0100 Subject: [PATCH] Ensure that the 'wcf' application is untainted This fixes up commit fc2b721517646af2e4d901d95eeba802c1eb6a7d. see #4057 --- .../package/PackageInstallationDispatcher.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php index 29ab84f96a..9db1c2ad9d 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php @@ -522,13 +522,19 @@ class PackageInstallationDispatcher { $host = str_replace(RouteHandler::getProtocol(), '', RouteHandler::getHost()); $path = RouteHandler::getPath(['acp']); + $isTainted = 1; + if ($this->getPackage()->package == 'com.woltlab.wcf') { + // com.woltlab.wcf is special, because promptPackageDir() will not be executed. + $isTainted = 0; + } + // insert as application ApplicationEditor::create([ 'domainName' => $host, 'domainPath' => $path, 'cookieDomain' => $host, 'packageID' => $package->packageID, - 'isTainted' => 1, + 'isTainted' => $isTainted, ]); } } -- 2.20.1