From: Alexander Ebert Date: Mon, 10 Jun 2013 18:21:23 +0000 (+0200) Subject: Fixed cookie domain handling X-Git-Tag: 2.0.0_Beta_4~77^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2af34948dd2d1da0ef1ea24d15796efc8be5cc50;p=GitHub%2FWoltLab%2FWCF.git Fixed cookie domain handling --- diff --git a/wcfsetup/install/files/lib/data/application/ApplicationAction.class.php b/wcfsetup/install/files/lib/data/application/ApplicationAction.class.php index 9029d08b46..1439613a0c 100644 --- a/wcfsetup/install/files/lib/data/application/ApplicationAction.class.php +++ b/wcfsetup/install/files/lib/data/application/ApplicationAction.class.php @@ -1,5 +1,7 @@ objects as $application) { - if (!isset($domains[$application->domainName])) { - $domains[$application->domainName] = array(); + $domainName = $application->domainName; + if (StringUtil::endsWith($domainName, $application->cookieDomain)) { + $domainName = $application->cookieDomain; + } + + if (!isset($domains[$domainName])) { + $domains[$domainName] = array(); } - $domains[$application->domainName][$application->packageID] = explode('/', FileUtil::removeLeadingSlash(FileUtil::removeTrailingSlash($application->domainPath))); + $domains[$domainName][$application->packageID] = explode('/', FileUtil::removeLeadingSlash(FileUtil::removeTrailingSlash($application->domainPath))); } WCF::getDB()->beginTransaction();