[TYPO3-dev] Cannot log in to backend on first attempt
Steffen Kamper
steffen at sk-typo3.de
Sat Jul 7 10:27:54 CEST 2007
Hi Ricardo,
i don't know what the real problem of the server was because it's 2 years
ago. But I know that i commented this block out to get it work
(t3lib_userauth)
if ($_SESSION['login_challenge'] !== $loginData['chalvalue']) {
if ($this->writeDevLog) t3lib_div::devLog('PHP Session stored
challenge "'.$_SESSION['login_challenge'].'" and submitted challenge
"'.$loginData['chalvalue'].'" did not match, so authentication failed!',
't3lib_userAuth', 2);
$this->logoff();
return FALSE;
}
In any way this was a very dirty hack and nothing for production, i changed
the server quickly because the provider wasn't able to fix.
vg Steffen
"Ricardo Pereira" <ricardo at tdwg.org> schrieb im Newsbeitrag
news:mailman.1.1183735153.7487.typo3-dev at lists.netfielders.de...
> Dear Steffen,
>
> Thanks so very much for your reply.
>
> That's a good lead, but could you please be just a little bit more
> specific? What was wrong with cookie handling in your case?
>
> Thanks a million once again!!
>
> Cheers,
>
> Ricardo
>
>
> Steffen Kamper wrote:
>> Hi,
>>
>> i had same Problem on a server sometimes ago. The problem was wrong
>> Cookie-Handling, this affected Sessionhandling as well.
>>
>> vg Steffen
>>
>> "Ricardo Pereira" <ricardo at tdwg.org> schrieb im Newsbeitrag
>> news:mailman.2624.1183678288.29892.typo3-dev at lists.netfielders.de...
>>> Hi all,
>>>
>>> I've set up Typo3 4.1.1 on SourceForge and for some strange reason I
>>> can never log in to the backend on the first attempt. It always fails.
>>> After the first attempt I can get in if I try it again right away, but
>>> sometimes it takes 3 or 4 attempts.
>>>
>>> I tried to trace the code all the way to line 1065 of file
>>> t3lib/class.t3lib_userauth.php, which I copy below:
>>>
>>> if ($this->challengeStoredInCookie) {
>>> session_start();
>>> if ($_SESSION['login_challenge'] !== $loginData['chalvalue']) { //
>>> <======================== THIS IS THE LINE I'M REFERRING TO!!
>>>
>>> if ($this->writeDevLog) t3lib_div::devLog('PHP Session stored
>>> challenge "'.$_SESSION['login_challenge'].'" and submitted challenge
>>> "'.$loginData['chalvalue'].'" did not match, so authentication failed!',
>>> 't3lib_userAuth', 2);
>>> $this->logoff();
>>> return FALSE;
>>> }
>>> }
>>>
>>> Sometimes, the $_SESSION variable is empty when the login is taking
>>> place and thus the test above fails.
>>>
>>> The very same setup works fine on my workstation, so I assume there
>>> is something in SF that is preventing the session variable from being
>>> set correctly. What is odd is that it works after the first attempt, but
>>> I don't know why.
>>>
>>> I would greatly appreciate if anyone could shed a light on this
>>> obscure problem I'm having.
>>>
>>> Cheers,
>>>
>>> Ricardo
>>>
>>>
>>>
>>
More information about the TYPO3-dev
mailing list