Issue Bug Closed

#14532scope of BE- and FE-Cookie: can't cope with multidomain-setup

Peter Niederlag 02/04/05, 17:17 updated 08/12/06, 14:22

Description


I posted this long ago I think, but as a customer just upgraded to 3.7 I’ve had to make the same old hack again. I had to hack t3lib_userauth (or in fact the XCLASS version of cc_sv_auth) to set a proper domain with the cookie.

I’d like to have a SYS[cookieDomain] setting in localconf.php that if set, will be used to set the cookie correctly. Otherwise you cannot share sessions across subdomains.

don’t know if that affects FE as well
<solution><br><cite martin kutschker><br>Local hack:</cite></solution>

In t3lib_userauth find the two occurences of SetCookie(). Now add your domain as “.MYDOMAIN.TLD” as last parameter (after ‘/’).

Better approach:

Like above but with an if-clause.

if ($TYPO3_CONF_VARS[‘SYS’][‘domainCookie’])
SetCookie($this->name, $id, 0,’/’,
$TYPO3_CONF_VARS[‘SYS’][‘domainCookie’])
else
SetCookie($this->name, $id, 0, ‘/’)

But that is assuming one domain for the whole installation. In case you have multiple domains with different subdmonains it won’t work. eg


(issue imported from #M752)

Reviews 0

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