mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
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:
@@ -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 + "]");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user