Fix a crash with WebMods and deleting User

If a user who is currently logged in to WebMods is deleted, his CWebSession
still kept a stale CUser pointer around. The next time he loaded a web page,
Bad Things(tm) happened.

This is fixed by deleting all of a user's sessions when that user is deleted.

Thanks to DarthGandalf for spotting the bug and writing the patch.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1827 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-03-11 17:29:36 +00:00
parent a74c2a4625
commit 4303c3c200
4 changed files with 24 additions and 3 deletions
+1
View File
@@ -208,6 +208,7 @@ bool CZNC::HandleUserDeletion()
pUser->DelClients();
pUser->DelModules();
CWebSock::FinishUserSessions(*pUser);
AddBytesRead(pUser->BytesRead());
AddBytesWritten(pUser->BytesWritten());
delete pUser;