From: mutec Date: Sun, 1 May 2022 20:53:53 +0000 (+0200) Subject: fix application management in multi domain setups X-Git-Tag: 5.5.0_Beta_1~3^2~5^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9ec12ca0dd7665752789541b086e6c3f630cf4ab;p=GitHub%2FWoltLab%2FWCF.git fix application management in multi domain setups 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. --- diff --git a/wcfsetup/install/files/lib/acp/form/ApplicationManagementForm.class.php b/wcfsetup/install/files/lib/acp/form/ApplicationManagementForm.class.php index a3ca319be2..fa1f87a385 100644 --- a/wcfsetup/install/files/lib/acp/form/ApplicationManagementForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/ApplicationManagementForm.class.php @@ -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, ''));