summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-08 14:50:54 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-08 14:50:54 +0000
commitc5316dcc140499646a95d4da3eda78b3511a44b8 (patch)
tree612426787b04af8d3f42ea87511f84accefe77b3 /src/configreader.cpp
parent1994ec96dc6db42363247532b15f73399c1406ed (diff)
Config reader strictness: check for escape sequences (\" etc) outside of a quoted section and deny it
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9868 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 552b5ae8e..f42bd79cd 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -1609,6 +1609,11 @@ bool ServerConfig::ParseLine(ConfigDataHash &target, const std::string &filename
current_value += *c;
continue;
}
+ else if ((*c == '\\') && (!in_quote))
+ {
+ errorstream << "You can't have an escape sequence outside of a quoted section: " << filename << ":" << linenumber << std::endl;
+ return false;
+ }
else if ((*c == '\n') && (in_quote))
{
/* Got a 'real' \n, treat it as part of the value */