Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Rob Boudrie on October 29, 2017, 12:53:48 PM

Title: Session timed out
Post by: Rob Boudrie on October 29, 2017, 12:53:48 PM
I am getting "Your session timed out while posting. Please go back and try again" when using the login box on the home page of the unmodified default theme, but not when I select the "login" link on that page next to "Welcome, Guest".

This is described in https://www.simplemachines.org/community/index.php?topic=555518.msg3937638#msg3937638 and there are suggestions regarding editing source files.  Should this be necessary on an unmodified installation, and do you know what version will contain a fix?

Thanks.
Title: Re: Session timed out
Post by: Sir Osis of Liver on October 29, 2017, 03:47:10 PM
That's a bug that has affected a few forums, including one I worked on.  IIRC, it was running 2.0.14 in php 7.1.  The only solution I found was to disable session check in LogInOut.php -



// Are you guessing with a script?
// checkSession('post');
spamProtection('login');



As this may cause a problem with future upgrades, you will want to undo this edit before patching to 2.0.15.

Title: Re: Session timed out
Post by: albertlast on October 29, 2017, 05:08:11 PM
Posible alternativ solution could be to go in LogInOut.php
in the function validatePasswordFlood (around line 678) and
look for the this three lines:
// Destroy any session or cookie data about this member, as they validated wrong.
require_once($sourcedir . '/Subs-Auth.php');
setLoginCookie(-3600, 0);


Change this to:
// Destroy any session or cookie data about this member, as they validated wrong.
// require_once($sourcedir . '/Subs-Auth.php');
// setLoginCookie(-3600, 0);


would be intresting if this fix this issue on smf 2.0.x (this changes a part of a smf 2.1 pr)
Title: Re: Session timed out
Post by: Sir Osis of Liver on October 29, 2017, 06:38:08 PM
Don't currently have access to an affected forum.  Would be helpful if OP could try it and report back.