Added a global config option for IP-based session protection.

The new setting defaults to true, and is settable in the web admin panel. When
set to false, IP address checks are ignored. For users behind proxies (students,
large corporate networks) that don't guarantee a consistent IP, this makes the
web admin panel much more usable.
This commit is contained in:
Michael Edgar committed 2011-04-13 20:24:26 -04:00
1 parent 2c6a54b617
commit a9ba4020db
5 files changed
+16 -1

No files matched your search

+2
View File
@@ -971,6 +971,7 @@ public:
Tmpl["ConnectDelay"] = CString(CZNC::Get().GetConnectDelay());
Tmpl["ServerThrottle"] = CString(CZNC::Get().GetServerThrottle());
Tmpl["AnonIPLimit"] = CString(CZNC::Get().GetAnonIPLimit());
Tmpl["ProtectWebSessions"] = CString(CZNC::Get().GetProtectWebSessions());
const VCString& vsBindHosts = CZNC::Get().GetBindHosts();
for (unsigned int a = 0; a < vsBindHosts.size(); a++) {
@@ -1061,6 +1062,7 @@ public:
sArg = WebSock.GetParam("connectdelay"); CZNC::Get().SetConnectDelay(sArg.ToUInt());
sArg = WebSock.GetParam("serverthrottle"); CZNC::Get().SetServerThrottle(sArg.ToUInt());
sArg = WebSock.GetParam("anoniplimit"); CZNC::Get().SetAnonIPLimit(sArg.ToUInt());
sArg = WebSock.GetParam("protectwebsessions"); CZNC::Get().SetProtectWebSessions(sArg.ToBool());
VCString vsArgs;
WebSock.GetRawParam("motd").Split("\n", vsArgs);