mirror of
https://github.com/znc/znc.git
synced 2026-08-06 17:03:14 +02:00
Fixed an issue identified by Un1matr1x: If you were running two 0.090 ZNCs on the same IP,
(but different ports), any web login session from ZNC #1 would overwrite the session from ZNC #2. While doing this, also removed an unnecessary check in CHTTPSock::SendCookie and CHTTPSock::GetRequestCookies (which doesn't transparently translate cookie names and has never been used so far). git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2030 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+1
-9
@@ -43,21 +43,13 @@ void CHTTPSock::ReadData(const char* data, size_t len) {
|
||||
|
||||
bool CHTTPSock::SendCookie(const CString& sKey, const CString& sValue) {
|
||||
if (!sKey.empty() && !sValue.empty()) {
|
||||
if (m_msRequestCookies.find(sKey) == m_msRequestCookies.end() ||
|
||||
m_msRequestCookies[sKey].StrCmp(sValue) != 0)
|
||||
{
|
||||
m_msResponseCookies[sKey] = sValue;
|
||||
}
|
||||
m_msResponseCookies[sKey] = sValue;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
const MCString& CHTTPSock::GetRequestCookies() const {
|
||||
return m_msRequestCookies;
|
||||
}
|
||||
|
||||
CString CHTTPSock::GetRequestCookie(const CString& sKey) const {
|
||||
MCString::const_iterator it = m_msRequestCookies.find(sKey);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user