[TYPO3-dev] Solving existing session problems - sole technical approach
Albert van der Veen
albert.van.der.veen at xs4all.nl
Tue Feb 3 14:59:01 CET 2009
Steffen Kamper wrote:
> Hi,
>
>
>>> After removing efa cookies are ok. I don't know much about the
>>> handling of cookies, is there an easy way to fix the javascript efa
>>> uses?
>
> should be easy
>
> // if document.domain is numeric, otherwise strip off the server name
> and use the remainder
> this.defaultDomain =
> (defaultDomain)?defaultDomain:(document.domain.search(/[a-zA-Z]/) ==
> -1)?document.domain:document.domain.substring(document.domain.indexOf('.')
> + 1,document.domain.length);
>
>
> remove the substring and use complete domain
>
> vg Steffen
Hi Steffen,
I tried your suggestion by changing the line above to:
this.defaultDomain = (defaultDomain)?defaultDomain:document.domain;
What happens now is that the host part of the cookie is prefixed with a
dot, so you get:
name be_typo_user
host .test.domain.org
expires: Wed, 03 Feb 2010 13:21:09 GMT
Strange thing is that I checked the value of 'cookies' around line 100
in cookies.js and there the value for domain is 'test.domain.org' (thus
correct value)! And right after the cookie is set with:
document.cookie = cookies;
So I would assume this would result in a correctly set cookie...
Any idea why a dot is placed in front when writing the cookies?
grtz,
Albert
More information about the TYPO3-dev
mailing list