diff options
author | Peter Powell <petpow@saberuk.com> | 2013-07-04 14:55:46 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2013-07-04 15:55:52 +0100 |
commit | be476a9d81660175f57657fc4ea77eb41fee4c2b (patch) | |
tree | 334461b6b5c07ea26ce7570639a5563b40822ec3 | |
parent | 4c12eafe612932f4b3f6806fc1bea79942998941 (diff) |
Fix users being able to set <server:network> to an invalid value.
-rw-r--r-- | src/configreader.cpp | 3 |
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>"); |