Unbreak WCFSetup
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 25 Jan 2021 18:04:17 +0000 (19:04 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 25 Jan 2021 18:04:17 +0000 (19:04 +0100)
wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php
wcfsetup/install/files/lib/system/session/SessionHandler.class.php

index 88f2151476f6e96745f0f9b8afddda76590e603b..a347e82c96e4723590d9b41a469a814f7f19d699 100644 (file)
@@ -259,6 +259,7 @@ class PackageInstallationDispatcher
                             )
                         )
                     );
+                    WCF::getSession()->registerReauthentication();
 
                     if (WCF::getSession()->getVar('__wcfSetup_developerMode')) {
                         $statement->execute([
index e9d5f7588cfebb0164e65f5f18d3c13eed54258e..ca0df2c247a64b58a07f96a706224454c3bac5a5 100644 (file)
@@ -384,7 +384,7 @@ final class SessionHandler extends SingletonFactory
         $cookieData = $this->getParsedCookieData();
 
         // No refresh is needed if the timestep matches up.
-        if ($cookieData['timestep'] === $this->getCookieTimestep()) {
+        if (isset($cookieData['timestep']) && $cookieData['timestep'] === $this->getCookieTimestep()) {
             return;
         }
 
@@ -1039,6 +1039,11 @@ final class SessionHandler extends SingletonFactory
             throw new \BadMethodCallException('The current user is a guest.');
         }
 
+        // Workaround during WCFSetup.
+        if (PACKAGE_ID) {
+            return false;
+        }
+
         // Reauthentication for third party authentication is not supported.
         if ($this->getUser()->authData) {
             return false;