News:

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

Main Menu

[SMF 2.0b3p] Undefined var when Session verification failed in adminpanel

Started by TheCoolGamer, March 18, 2008, 08:30:40 PM

Previous topic - Next topic

TheCoolGamer

When you get the following error
QuoteSession verification failed. Please try logging out and back in again, and then try again.
in the admin panel the following is added to the errorlog:
testadmin
Today at 01:16:01 am
10.0.0.1 
48df682cc09a8060b72d338f3e2dd54e 
Type of error: Undefined
http://.../smfbeta/index.php?action=admin;area=serversettings;sa=other;sesc

8: Undefined index: description

File: E:/.../htdocs/smfbeta/Themes/default/Errors.template.php (generic_menu_dropdown_above sub template - eval?)
Line: 280


To replicate you could use the following link when logged in in the adminpanel:
index.php?action=admin;area=serversettings;sesc=invalid

Also, it seems that not all pages check sesc, is that ok?

SleePy

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


SleePy

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

TheCoolGamer


SleePy

I am so sorry about that.. In addition to my own connection issues the server load here was just crazy a bit ago. It didn't post the first time so I tried again after a few minutes, I guess the first one finally went through :P

That error actually now that I look at it.
Do you use a non english languages?

The error is coming from the section that loads up the tabs for those links. From the looks of it, it isn't getting set with the proper data.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

TheCoolGamer

No, I'm using English.

I think I found the bug. It is in ManageServer.php. It only happens when changing to server settings as far as I know.

function ModifySettings()
{
...

// This is just to keep the database password more secure.
isAllowedTo('admin_forum');
checkSession('get');

...

// Load up all the tabs...
$context[$context['admin_menu_name']]['tab_data'] = array(
'title' => &$txt['admin_server_settings'],
'help' => 'serversettings',
'description' => $txt['admin_basic_settings'],
);
}

The problem is that you leave the page at checkSession(), so that the tabdata isn't loaded. Putting chechSession() more in the end of the function would help.

SleePy

Ahh. I see it now.

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

Advertisement: