News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Session timed out

Started by Rob Boudrie, October 29, 2017, 12:53:48 PM

Previous topic - Next topic

Rob Boudrie

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.

Sir Osis of Liver

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.

"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

albertlast

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)

Sir Osis of Liver

Don't currently have access to an affected forum.  Would be helpful if OP could try it and report back.
"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

Advertisement: