mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Make sure CWebSock::GetSession() only generates one session
When one sent a basic-auth header, OnLogin() was called with the request's data which caused a GetSession() call which generated a new session. Sadly, this session wasn't saved anywhere, so a new one session was generated later when OnPageRequest() triggered. This could lead to a NULL pointer dereference. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1857 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -683,6 +683,8 @@ CSmartPtr<CWebSession> CWebSock::GetSession() {
|
||||
CSmartPtr<CWebSession> spSession(new CWebSession(sSessionID));
|
||||
m_mspSessions.AddItem(spSession->GetId(), spSession);
|
||||
|
||||
m_spSession = spSession;
|
||||
|
||||
return spSession;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user