Ensure that the 'wcf' application is untainted
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 12 Mar 2021 09:58:20 +0000 (10:58 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 12 Mar 2021 09:58:20 +0000 (10:58 +0100)
This fixes up commit fc2b721517646af2e4d901d95eeba802c1eb6a7d.

see #4057

wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php

index 29ab84f96ad968a3cf043f7446819fb835951590..9db1c2ad9dff06cd3f6f0cef2ee5b390afad5122 100644 (file)
@@ -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,
                                ]);
                        }
                }