Issue Bug Closed

#15304Scope of BE- and FE-Cookie: multi typo3 instance on one domain

old_hkdennis2k 12/22/05, 09:28 updated 08/12/06, 14:22

Description

If you installed more than one typo3 instance on same domain, the user session cookie will invaild and overwrite eachother.

Solution: apply typo3 site path into cookie
—————
if (($this->newSessionID || $this->forceSetCookie) && $this->lifetime==0 ) {
if (!$this->dontSetCookie) {
//SetCookie($this->name, $id, 0, ‘/’);
$folder=substr(t3lib_div::getIndpEnv(‘TYPO3_SITE_URL’),strlen(t3lib_div::getIndpEnv(‘TYPO3_REQUEST_HOST’)));;
SetCookie($this->name, $id, 0, $folder);
if ($this->writeDevLog) t3lib_div::devLog(‘Set new Cookie: ‘.$id, ‘t3lib_userAuth’);
}
}

// If it is NOT a session-cookie, we need to refresh it.
if ($this->lifetime > 0) {
if (!$this->dontSetCookie) {
//SetCookie($this->name, $id, time()+$this->lifetime, ‘/’);
$folder=substr(t3lib_div::getIndpEnv(‘TYPO3_SITE_URL’),strlen(t3lib_div::getIndpEnv(‘TYPO3_REQUEST_HOST’)));;
SetCookie($this->name, $id, 0, $folder);
if ($this->writeDevLog) t3lib_div::devLog(‘Update Cookie: ‘.$id, ‘t3lib_userAuth’);
}
}

(issue imported from #M2078)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.