summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/configreader.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 56eefa9ed..ba39a563e 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -1428,6 +1428,12 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, FILE* &conf, const char* fil
if (ch != '\r')
line += ch;
+ if ((ch != '<') && (!in_tag) && (!in_comment) && (ch > ' ') && (ch != 9))
+ {
+ errorstream << "Stray character outside of a configuration tag: '" << ch << "': " << filename << ":" << linenumber << std::endl;
+ return false;
+ }
+
if (ch == '<')
{
if (in_tag)