Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: jonesH on March 21, 2019, 05:46:41 PM

Title: Login Error with Core Theme Only
Post by: jonesH on March 21, 2019, 05:46:41 PM
Hi. I have SMF with Simple Portal and SMF Gallery Lite (all stock, new install, Admin the only user).
If running the Core theme in a fresh Firefox browser,  logging in from the top-left corner boxes leads to this: "Your session timed out while posting.  Please go back and try again." Also, the url string looks something like this: ""http://localhost/forums/testforum/index.php?PHPSESSID=utvtimf4k58q1j6mh7nh1id96r&action=login2 (http://localhost/forums/testforum/index.php?PHPSESSID=utvtimf4k64q1j4mh7nh1id96r&action=login2)".
Subsequent attempts of the same change to this look instead: "http://localhost/forums/testforum/index.php?action=login2 (http://localhost/forums/testforum/index.php?action=login2)".
I tried this with Firefox set up in various ways, because I get the feeling this error has something to do with the cookie handling. But I might be wrong.

At setup time, I chose the "Database sessions" option.

This error only happens to me in the CoreTheme and only from the top-left boxes. All other options log me in just fine.

What might be the problem?...
Thanks for looking into this.
Title: Re: Login Error with Core Theme Only
Post by: Arantor on March 21, 2019, 05:50:04 PM
The core theme has a bug and wasn't patched properly in previous versions.

https://wiki.simplemachines.org/smf/Login_error_2.0.14 has more information.
Title: Re: Login Error with Core Theme Only
Post by: Sir Osis of Liver on March 21, 2019, 05:52:48 PM
You have to add session check to header login in Core theme.

index.template.php

Find this -



<input type="hidden" name="hash_passwrd" value="" />



Do this -



<input type="hidden" name="hash_passwrd" value="" />
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />


Title: Re: Login Error with Core Theme Only
Post by: jonesH on March 21, 2019, 06:00:54 PM
Thank you both for your quick replies!
I tried Aranthor's advice and login works fine now. I will undo that and then try Sir Osis if Liver's method - I am sure it will work as well. Then I will try to make sense of the code.
Again, thanks!
Title: Re: Login Error with Core Theme Only
Post by: Arantor on March 21, 2019, 06:06:27 PM
Considering that they're literally the same advice presented in different ways... ;)
Title: Re: Login Error with Core Theme Only
Post by: Sir Osis of Liver on March 21, 2019, 06:07:33 PM
It's the same fix.  The session check was added to login in 2.0.14 for added security.  It's included in both header login and login window in Curve theme, but was omitted from Core header login.  Some custom themes have it, some don't and have to be fixed.
Title: Re: Login Error with Core Theme Only
Post by: jonesH on March 21, 2019, 06:57:15 PM
Yes, indeed, I see now that each advice tells the same steps and leads to the same result...
Title: Re: Login Error with Core Theme Only
Post by: arielvered on May 06, 2019, 07:17:56 AM
Quote from: Arantor on March 21, 2019, 05:50:04 PM
The core theme has a bug and wasn't patched properly in previous versions.

https://wiki.simplemachines.org/smf/Login_error_2.0.14 has more information.

I have tried adding this and it did not help.
I am getting this error only on a single computer, on a different computer (same user) not getting it.
I have cleared cache and passwords, etc. Even tried a different browser.