mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 12:07:46 +03:00
Fix a few things to provide an easy interface for script bindings
This commit is contained in:
21
src/rule.cc
21
src/rule.cc
@@ -13,7 +13,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "src/rule.h"
|
||||
#include "modsecurity/rule.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -135,6 +135,25 @@ Rule::Rule(Operator *_op,
|
||||
}
|
||||
|
||||
|
||||
std::vector<std::string> Rule::getActionNames() {
|
||||
std::vector<std::string> a;
|
||||
for (auto &z : this->actions_runtime_pos)
|
||||
{
|
||||
a.push_back(z->action);
|
||||
}
|
||||
for (auto &z : this->actions_runtime_pre)
|
||||
{
|
||||
a.push_back(z->action);
|
||||
}
|
||||
for (auto &z : this->actions_conf)
|
||||
{
|
||||
a.push_back(z->action);
|
||||
}
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
bool Rule::evaluateActions(Assay *assay) {
|
||||
int none = 0;
|
||||
bool containsDisruptive = false;
|
||||
|
Reference in New Issue
Block a user