[TYPO3-core] RFC: multi-multi-domain cookies
Sebastian Kurfuerst
sebastian at garbage-group.de
Sat Jan 7 19:04:47 CET 2006
Hi Masi,
first of all - nice patch :-)
Here are my comments:
please adjust the documentation in config_default to state that if you
put the string into /.../, it will be parsed as regExp.
> // If new session and the cookie is a
> sessioncookie, we need to set it only once!
> if (($this->newSessionID || $this->forceSetCookie) &&
> $this->lifetime==0 ) {
> if (!$this->dontSetCookie) {
> - if
> ($TYPO3_CONF_VARS['SYS']['cookieDomain']) SetCookie($this->name,
> $id, 0, '/', $TYPO3_CONF_VARS['SYS']['cookieDomain']);
> - else SetCookie($this->name, $id, 0,
> '/');
> - if
> ($this->writeDevLog) t3lib_div::devLog('Set new Cookie: '.$id,
> 't3lib_userAuth');
> + if ($cookieDomain) {
> + SetCookie($this->name, $id, 0,
> '/', $cookieDomain);
> + } else {
> + SetCookie($this->name, $id, 0,
> '/');
> + }
> + if
> ($this->writeDevLog) t3lib_div::devLog('Set new Cookie:
> '.$id.($ccokieDomain ? ', '.$ccokieDomain : ''), 't3lib_userAuth');
> }
> }
>
> // If it is NOT a session-cookie, we need to
> refresh it.
> if ($this->lifetime > 0) {
> if (!$this->dontSetCookie) {
> - if
> ($TYPO3_CONF_VARS['SYS']['cookieDomain']) SetCookie($this->name,
> $id, time()+$this->lifetime, '/',
> $TYPO3_CONF_VARS['SYS']['cookieDomain']);
> - else SetCookie($this->name, $id,
> time()+$this->lifetime, '/');
> - if
> ($this->writeDevLog) t3lib_div::devLog('Update Cookie: '.$id,
> 't3lib_userAuth');
> + if ($cookieDomain) {
> + SetCookie($this->name, $id,
> time()+$this->lifetime, '/', $cookieDomain);
> + } else {
> + SetCookie($this->name, $id,
> time()+$this->lifetime, '/');
> + }
> + if
> ($this->writeDevLog) t3lib_div::devLog('Update Cookie:
> '.$id.($ccokieDomain ? ', '.$ccokieDomain : ''), 't3lib_userAuth');
> }
> }
I think this is already in CVS code by me. Please just check that there
are no problems when merging.
+1 if config_default is updated.
Greets, Sebastian
More information about the TYPO3-team-core
mailing list