changed: now we are parsing directories and functions before checking a session
added: need_session to FunctionBase (true if the functions requires a session)
default: true
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1114 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -460,16 +460,23 @@ void SessionManager::SetSession()
|
||||
|
||||
if( !IsIPBanned() )
|
||||
{
|
||||
CookieTab::iterator i = cur->request->cookie_tab.find(config->http_session_id_name);
|
||||
|
||||
if( i != cur->request->cookie_tab.end() )
|
||||
if( cur->request->function && cur->request->function->need_session )
|
||||
{
|
||||
if( !SetSessionFromCookie(i->second) )
|
||||
cur->request->cookie_tab.erase(i);
|
||||
CookieTab::iterator i = cur->request->cookie_tab.find(config->http_session_id_name);
|
||||
|
||||
if( i != cur->request->cookie_tab.end() )
|
||||
{
|
||||
if( !SetSessionFromCookie(i->second) )
|
||||
cur->request->cookie_tab.erase(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
NoSessionCookieCheckBan();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NoSessionCookieCheckBan();
|
||||
SetTemporarySession();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user