Use a random string instead of an md5 hash for session IDs

This string has the same length as the md5 hash, but it does actually contain
more entropy. Also, why md5? :/


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1804 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-03-04 14:03:27 +00:00
parent b0128cf130
commit 9f742b352d

View File

@@ -26,7 +26,7 @@ bool CZNCTagHandler::HandleTag(CTemplate& Tmpl, const CString& sName, const CStr
CWebSession::CWebSession(const CString& sId) : m_sId(sId) {
if (m_sId.empty()) {
m_sId = CBlowfish::MD5(CString::RandomString(4096), true);
m_sId = CString::RandomString(32);
DEBUG("Auto generated session: [" + m_sId + "]");
}