mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 13:26:01 +03:00
Adds sanity check on SecRemoteRules directive input
This commit is contained in:
parent
3d425997df
commit
4b70c78fff
@ -936,6 +936,10 @@ EQUALS_MINUS (?i:=\-)
|
||||
std::string url;
|
||||
|
||||
std::vector<std::string> 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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user