fix application management in multi domain setups
authormutec <mysterycode@mysterycode.de>
Sun, 1 May 2022 20:53:53 +0000 (22:53 +0200)
committermutec <mysterycode@mysterycode.de>
Sun, 1 May 2022 20:53:53 +0000 (22:53 +0200)
Changing the landing pages of apps was failing since the domain name for single-domain-setups was validated for any case, but is not set when using a multi-domain-setup.
This lead to an un-meaningful error-message saying something is incorrect.

wcfsetup/install/files/lib/acp/form/ApplicationManagementForm.class.php

index a3ca319be2d031e2a79e5a8ecd63f7a64d958d6f..fa1f87a385b815a3d35f5ccf5b94e72e82e0c275 100644 (file)
@@ -103,11 +103,11 @@ final class ApplicationManagementForm extends AbstractForm
             if (!empty($this->cookieDomain) || !empty($this->domainName)) {
                 throw new PermissionDeniedException();
             }
-        }
-
-        if (empty($this->domainName)) {
-            throw new UserInputException('domainName');
         } else {
+            if (empty($this->domainName)) {
+                throw new UserInputException('domainName');
+            }
+
             $regex = new Regex('^https?\://');
             $this->domainName = FileUtil::removeTrailingSlash($regex->replace($this->domainName, ''));
             $this->cookieDomain = FileUtil::removeTrailingSlash($regex->replace($this->cookieDomain, ''));