parser: Adds SecRuleUpdateActionById is not yet supported

This commit is contained in:
Felipe Zimmerle
2017-08-17 15:08:38 -03:00
parent d7eab6b7a3
commit 945ee27a85
5 changed files with 5448 additions and 5348 deletions

View File

@@ -570,6 +570,7 @@ using modsecurity::operators::Operator;
CONFIG_SEC_RULE_REMOVE_BY_MSG "CONFIG_SEC_RULE_REMOVE_BY_MSG"
CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG "CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG"
CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID "CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID"
CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID "CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID"
CONFIG_UPDLOAD_KEEP_FILES "CONFIG_UPDLOAD_KEEP_FILES"
CONFIG_UPDLOAD_SAVE_TMP_FILES "CONFIG_UPDLOAD_SAVE_TMP_FILES"
CONFIG_UPLOAD_DIR "CONFIG_UPLOAD_DIR"
@@ -1265,6 +1266,31 @@ expression:
YYERROR;
}
}
| CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID actions
{
std::string error;
double ruleId;
try {
ruleId = std::stod($1);
} catch (...) {
std::stringstream ss;
ss << "SecRuleUpdateActionById: failed to load:";
ss << "The input \"" + $1 + "\" does not ";
ss << "seems to be a valid rule id.";
ss << ". ";
driver.error(@0, ss.str());
YYERROR;
}
std::vector<actions::Action *> *a = new std::vector<actions::Action *>();
for (auto &i : *$2.get()) {
a->push_back(i.release());
}
driver.error(@0, "SecRuleUpdateActionById is not yet supported");
YYERROR;
}
/* Debug log: start */
| CONFIG_DIR_DEBUG_LVL
{