mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Bugfix for CWebSock::GetRequestCookie()
When a module page is requested, m_sModName is set. When then GetSession() tries to look up its session cookie, it doesn't find it since GetRequestCookie() actually looks up Mod::<modname>::<cookie name>. The fix is to look up the global cookie name if the mod one doesnt exist. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1861 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -478,11 +478,16 @@ bool CWebSock::ForceLogin() {
|
||||
}
|
||||
|
||||
CString CWebSock::GetRequestCookie(const CString& sKey) const {
|
||||
CString sRet;
|
||||
|
||||
if (!m_sModName.empty()) {
|
||||
return CHTTPSock::GetRequestCookie("Mod::" + m_sModName + "::" + sKey);
|
||||
sRet = CHTTPSock::GetRequestCookie("Mod::" + m_sModName + "::" + sKey);
|
||||
}
|
||||
|
||||
return CHTTPSock::GetRequestCookie(sKey);
|
||||
if (sRet.empty()) {
|
||||
return CHTTPSock::GetRequestCookie(sKey);
|
||||
}
|
||||
return sRet;
|
||||
}
|
||||
|
||||
bool CWebSock::SendCookie(const CString& sKey, const CString& sValue) {
|
||||
|
||||
Reference in New Issue
Block a user