summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2013-07-04 09:05:39 -0700
committerAttila Molnar <attilamolnar@hush.com>2013-07-04 09:05:39 -0700
commitf6d68c82e7f46a107f4b7593d1b19876fe0a9660 (patch)
tree334461b6b5c07ea26ce7570639a5563b40822ec3
parent4c12eafe612932f4b3f6806fc1bea79942998941 (diff)
parentbe476a9d81660175f57657fc4ea77eb41fee4c2b (diff)
Merge pull request #580 from SaberUK/master+restrict-network-name
Fix users being able to set <server:network> to an invalid value.
-rw-r--r--src/configreader.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 31287b396..85cf357c4 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -433,6 +433,9 @@ void ServerConfig::Fill()
InvBypassModes = options->getBool("invitebypassmodes", true);
NoSnoticeStack = options->getBool("nosnoticestack", false);
+ if (Network.find(' ') != std::string::npos)
+ throw CoreException(Network + " is not a valid network name. A network name must not contain spaces.");
+
range(SoftLimit, 10, ServerInstance->SE->GetMaxFds(), ServerInstance->SE->GetMaxFds(), "<performance:softlimit>");
range(MaxTargets, 1, 31, 20, "<security:maxtargets>");
range(NetBufferSize, 1024, 65534, 10240, "<performance:netbuffersize>");