From c5316dcc140499646a95d4da3eda78b3511a44b8 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 8 Jun 2008 14:50:54 +0000 Subject: 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 --- src/configreader.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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 */ -- cgit v1.2.3