Do not expose ZNC's version number through the web interface

unless there's an active user session.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1877 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
cflakes
2010-04-04 15:20:22 +00:00
parent 3366c02777
commit e67b07f07a
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -384,7 +384,7 @@ CString CHTTPSock::GetErrorPage(unsigned int uStatusId, const CString& sStatusMs
"<html><head>\r\n<title>" + CString(uStatusId) + " " + sStatusMsg.Escape_n(CString::EHTML) + "</title>\r\n"
"</head><body>\r\n<h1>" + sStatusMsg.Escape_n(CString::EHTML) + "</h1>\r\n"
"<p>" + sMessage.Escape_n(CString::EHTML) + "</p>\r\n"
"<hr>\r\n<address>" + CZNC::GetTag().Escape_n(CString::EHTML) + " at " + GetLocalIP().Escape_n(CString::EHTML) + " Port " + CString(GetLocalPort()) + "</address>\r\n"
"<hr />\r\n<address>" + CZNC::GetTag(false).Escape_n(CString::EHTML) + " at " + GetLocalIP().Escape_n(CString::EHTML) + " Port " + CString(GetLocalPort()) + "</address>\r\n"
"</body></html>\r\n";
}
@@ -433,7 +433,7 @@ bool CHTTPSock::PrintHeader(off_t uContentLength, const CString& sContentType, u
Write("HTTP/" + CString(m_bHTTP10Client ? "1.0 " : "1.1 ") + CString(uStatusId) + " " + sStatusMsg + "\r\n");
//Write("Date: Tue, 28 Jun 2005 20:45:36 GMT\r\n");
Write("Server: " + CZNC::GetTag() + "\r\n");
Write("Server: " + CZNC::GetTag(false) + "\r\n");
if (uContentLength > 0) {
Write("Content-Length: " + CString(uContentLength) + "\r\n");
}
+1 -1
View File
@@ -305,7 +305,7 @@ void CWebSock::SetPaths(CModule* pModule, bool bIsTemplate) {
void CWebSock::SetVars() {
m_Template["SessionUser"] = GetUser();
m_Template["SessionIP"] = GetRemoteIP();
m_Template["Tag"] = CZNC::GetTag();
m_Template["Tag"] = CZNC::GetTag(GetSession()->GetUser() != NULL);
m_Template["SkinName"] = GetSkinName();
if (GetSession()->IsAdmin()) {