mirror of
https://github.com/znc/znc.git
synced 2026-06-21 10:35:05 +02:00
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:
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user