Accept new line + caridge return in the rules parser

This commit is contained in:
Felipe Zimmerle 2016-07-01 16:06:34 -03:00
parent 578dabea8b
commit 71acdaf8c5
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -455,6 +455,7 @@ CONFIG_DIR_UNICODE_MAP_FILE (?i:SecUnicodeMapFile)
#[ \t]*SecRule[^\\].*\\[ \t]*[\r\n]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(COMMENT); }
#[ \t]*SecAction[^\\].*\\[ \t]*[^\\n] { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(COMMENT); }
#.* { driver.loc.back()->step(); /* comment, just ignore. */ }
\r { driver.loc.back()->step(); /* carriage return, just ignore. */}
. { driver.error (*driver.loc.back(), "invalid character", yytext); throw yy::seclang_parser::syntax_error(*driver.loc.back(), ""); }
<<EOF>> {
if (driver.ref.size() > 0) {