News:

Wondering if this will always be free?  See why free is better.

Main Menu

[SMF 1.1] Redirection after login on SMF 1.1.4

Started by DarKChAm, March 01, 2008, 08:56:51 AM

Previous topic - Next topic

DarKChAm

Hello,

First, I want to precise that I'm French, and my english is very bad. Please forgive me.

I've found a bug on the version 1.1.4 of SMF. I've posted a similar topic in french board, but I think this board is more adapted for this problem.

The bug is: I can't be redirect on my specified page with the SSI. I use Windows on my localhost, and I'm forever redirect on the forum's index. My PHP version is 5.2.0.

I've tried many situations, I've studied the Login2() function in LogInOut.php, but nothing, I don't know why but with the function setLoginCookie(), my login_url session no more exists after the redirection with params : "sa=check".

So I've studied the function setLoginCookie() in Subs-Auth.php, and I've realised that the destruction of the session to create a new is the source of this problem.

With many test, I found that the line 183 of Subs-Auth.php which contains :
setcookie(session_name(), session_id(), time() + $cookie_length);
This line, if it was execute, resolve my problem of redirection. Bug before this line there is a condition which test the PHP version. And normally, only with the version 4.3.2 of PHP the line 183 is executed.

So, to resolve my problem I've just added comment symbols before the condition line. But I don't understand why this line is needed for my configuration. Have you ever seen this problem? Do you understand what is the really problem? I've not the time to search more, but I just to report this, and maybe understand it.

Thank you,
Sorry again for my English.

SleePy

#1
This is a known bug.

I did a lot of work to figure this out and found out the cookie seems to get corrupted by a session fix that was added in 1.1.3 (I believe or 1.1.2)

http://dev.simplemachines.org/mantis/view.php?id=1183
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

DarKChAm

Ok, so are there others solutions to fix this bug? My mine is not the most clearly I pressume.

SleePy

comment out the if above it and force SMF to generate a new cookie.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

DarKChAm

Ok thanks so I've found the best solution.

SleePy

Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Advertisement: