File tree Expand file tree Collapse file tree 5 files changed +10
-6
lines changed Expand file tree Collapse file tree 5 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,8 @@ namespace modsecurity {
95
95
*/
96
96
using ModSecString = std::string;
97
97
98
+ using RuleId = int64_t ;
99
+
98
100
/* *
99
101
*
100
102
* The Phases enumerator consists in mapping the different stages of a
Original file line number Diff line number Diff line change @@ -45,13 +45,13 @@ class Rules {
45
45
void dump () const ;
46
46
47
47
int append (Rules *from,
48
- const std::vector<int64_t > &ids,
48
+ const std::vector<RuleId > &ids,
49
49
std::ostringstream *err);
50
50
51
51
bool insert (const std::shared_ptr<Rule> &rule);
52
52
53
53
bool insert (std::shared_ptr<Rule> rule,
54
- const std::vector<int64_t > *ids,
54
+ const std::vector<RuleId > *ids,
55
55
std::ostringstream *err);
56
56
57
57
size_t size () const ;
Original file line number Diff line number Diff line change @@ -408,7 +408,7 @@ class RuleWithActions : public Rule {
408
408
return dst;
409
409
}
410
410
411
- inline int64_t getId () const { return m_ruleId; }
411
+ inline RuleId getId () const { return m_ruleId; }
412
412
void setId (int id) {
413
413
m_ruleId = id;
414
414
}
@@ -443,7 +443,7 @@ class RuleWithActions : public Rule {
443
443
}
444
444
445
445
private:
446
- int64_t m_ruleId;
446
+ RuleId m_ruleId;
447
447
448
448
std::shared_ptr<RuleWithActions> m_chainedRuleChild;
449
449
RuleWithActions *m_chainedRuleParent;
Original file line number Diff line number Diff line change 20
20
namespace modsecurity {
21
21
22
22
23
- int Rules::append (Rules *from, const std::vector<int64_t > &ids, std::ostringstream *err) {
23
+ int Rules::append (Rules *from, const std::vector<RuleId > &ids, std::ostringstream *err) {
24
24
size_t j = 0 ;
25
25
for (; j < from->size (); j++) {
26
26
RuleWithActions *rule = dynamic_cast <RuleWithActions*>(from->at (j).get ());
@@ -42,7 +42,7 @@ bool Rules::insert(const std::shared_ptr<Rule> &rule) {
42
42
}
43
43
44
44
45
- bool Rules::insert (std::shared_ptr<Rule> rule, const std::vector<int64_t > *ids, std::ostringstream *err) {
45
+ bool Rules::insert (std::shared_ptr<Rule> rule, const std::vector<RuleId > *ids, std::ostringstream *err) {
46
46
RuleWithActions*r = dynamic_cast <RuleWithActions*>(rule.get ());
47
47
if (r && ids != nullptr
48
48
&& std::binary_search (ids->begin (), ids->end (), r->getId ())) {
Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ duplicateBranch:src/request_body_processor/multipart.cc:93
56
56
danglingTempReference:src/modsecurity.cc:206
57
57
knownConditionTrueFalse:src/operators/validate_url_encoding.cc:77
58
58
knownConditionTrueFalse:src/operators/verify_svnr.cc:88
59
+ noConstructor:src/actions/rule_id.h:33
60
+ functionStatic:src/actions/rule_id.h:35
59
61
60
62
noExplicitConstructor:seclang-parser.hh
61
63
constParameter:seclang-parser.hh
You can’t perform that action at this time.
0 commit comments