Webadmin: Don't include the ZNC version in the basic auth realm

If you save a password in your browser that password is bound to the "realm" of
the authentication. Since ZNC included its version number in this, all your
saved passwords were rendered useless on upgrade.

Avoid this by not including the version number in the HTTP authentication realm.

Thanks to tylerdu for reporting this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1627 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2009-09-14 17:23:40 +00:00
parent 0ba3b52174
commit 7c899a1d0c
+1 -1
View File
@@ -360,7 +360,7 @@ bool CHTTPSock::ForceLogin() {
}
CString sPage = GetErrorPage(401, "Unauthorized", "You need to login to view this page.");
AddHeader("WWW-Authenticate", "Basic realm=\"" + CZNC::GetTag() + "\"");
AddHeader("WWW-Authenticate", "Basic realm=\"" + CZNC::GetTag(false) + "\"");
PrintHeader(sPage.length(), "text/html", 401, "Unauthorized");
Write(sPage);
Close(Csock::CLT_AFTERWRITE);