fix rsub input parsing and add maturity, ver and accuracy actions

This commit is contained in:
brenosilva
2012-06-04 15:29:51 +00:00
parent 480af9375d
commit d88a24da1f
7 changed files with 123 additions and 9 deletions

View File

@@ -459,6 +459,33 @@ static apr_status_t msre_action_sanitizeMatchedBytes_init(msre_engine *engine,
return 1;
}
/* accuracy */
static apr_status_t msre_action_accuracy_init(msre_engine *engine,
msre_actionset *actionset, msre_action *action)
{
actionset->accuracy = atoi(action->param);
return 1;
}
/* maturity */
static apr_status_t msre_action_maturity_init(msre_engine *engine,
msre_actionset *actionset, msre_action *action)
{
actionset->maturity = atoi(action->param);
return 1;
}
/* ver */
static apr_status_t msre_action_ver_init(msre_engine *engine,
msre_actionset *actionset, msre_action *action)
{
actionset->version = action->param;
return 1;
}
/* severity */
static apr_status_t msre_action_severity_init(msre_engine *engine,
@@ -2285,6 +2312,45 @@ void msre_engine_register_default_actions(msre_engine *engine) {
NULL
);
/* accuracy */
msre_engine_action_register(engine,
"accuracy",
ACTION_METADATA,
1, 1,
NO_PLUS_MINUS,
ACTION_CARDINALITY_ONE,
ACTION_CGROUP_NONE,
NULL,
msre_action_accuracy_init,
NULL
);
/* maturity */
msre_engine_action_register(engine,
"maturity",
ACTION_METADATA,
1, 1,
NO_PLUS_MINUS,
ACTION_CARDINALITY_ONE,
ACTION_CGROUP_NONE,
NULL,
msre_action_maturity_init,
NULL
);
/* ver */
msre_engine_action_register(engine,
"ver",
ACTION_METADATA,
1, 1,
NO_PLUS_MINUS,
ACTION_CARDINALITY_ONE,
ACTION_CGROUP_NONE,
NULL,
msre_action_ver_init,
NULL
);
/* severity */
msre_engine_action_register(engine,
"severity",