diff --git a/src/parser/seclang-scanner.ll b/src/parser/seclang-scanner.ll index 11ccc358..d710a74d 100755 --- a/src/parser/seclang-scanner.ll +++ b/src/parser/seclang-scanner.ll @@ -936,6 +936,10 @@ EQUALS_MINUS (?i:=\-) std::string url; std::vector conf = modsecurity::utils::string::split(yytext, ' '); + if (conf.size() < 2) { + driver.error (*driver.loc.back(), "", "SecRemoteRules demands a key and a URI"); + throw p::syntax_error(*driver.loc.back(), ""); + } key = conf[1]; url = conf[2]; c.setKey(key);