Skip to content

Commit 897181e

Browse files
committed
Merge branch 'v3/master' into performance_tweaks
2 parents c9f2f35 + b4f23d0 commit 897181e

File tree

213 files changed

+25753
-21370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

213 files changed

+25753
-21370
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,8 @@ the utilities, follow the commands listed below:
217217

218218
```shell
219219
$ cd /path/to/your/ModSecurity
220-
$ git submodule foreach git pull
221-
$ cd test
222-
$ ./regression_tests
223-
$ ./unit_tests
220+
$ git submodule update --init --recursive
221+
$ make check
224222
```
225223

226224
### Debugging

configure.ac

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ AC_MSG_ERROR([\
6868
6969
You can download libInjection using git:
7070
71-
$ git submodule init
72-
$ git submodule update
71+
$ git submodule update --init --recursive
7372
7473
])
7574
fi
@@ -90,8 +89,7 @@ AC_MSG_ERROR([\
9089
9190
You can download Mbed TLS using git:
9291
93-
$ git submodule init
94-
$ git submodule update
92+
$ git submodule update --init --recursive
9593
9694
])
9795
fi

headers/modsecurity/collection/collection.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <vector>
2222
#include <algorithm>
2323
#include <memory>
24+
#include <cstdint>
2425
#endif
2526

2627

src/engine/lua.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ class LuaScriptBlob {
3636
m_data(NULL),
3737
m_len(0) { }
3838

39+
LuaScriptBlob(const LuaScriptBlob&) = delete;
40+
LuaScriptBlob& operator=(const LuaScriptBlob&) = delete;
41+
3942
~LuaScriptBlob() {
4043
if (m_data) {
4144
free(m_data);

src/operators/pm.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ class Pm : public Operator {
4040
: Operator(n, std::move(param)) {
4141
m_p = acmp_create(0);
4242
}
43+
44+
Pm(const Pm&) = delete;
45+
Pm& operator=(const Pm&) = delete;
46+
4347
~Pm() override;
4448
bool evaluate(Transaction *transaction, RuleWithActions *rule,
4549
const std::string &str,

src/operators/rx.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ class Rx : public Operator {
4242
m_couldContainsMacro = true;
4343
}
4444

45+
Rx(const Rx&) = delete;
46+
Rx& operator=(const Rx&) = delete;
47+
4548
~Rx() override {
4649
if (m_string->m_containsMacro == false && m_re != NULL) {
4750
delete m_re;

src/operators/rx_global.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ class RxGlobal : public Operator {
4242
m_couldContainsMacro = true;
4343
}
4444

45+
RxGlobal(const RxGlobal&) = delete;
46+
RxGlobal& operator=(const RxGlobal&) = delete;
47+
4548
~RxGlobal() override {
4649
if (m_string->m_containsMacro == false && m_re != NULL) {
4750
delete m_re;

src/request_body_processor/multipart.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ class MultipartPart {
150150
class Multipart {
151151
public:
152152
Multipart(const std::string &header, Transaction *transaction);
153+
154+
Multipart(const Multipart&) = delete;
155+
Multipart& operator=(const Multipart&) = delete;
156+
153157
~Multipart();
154158

155159
bool init(std::string *err);

src/utils/ip_tree.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ namespace Utils {
3131
class IpTree {
3232
public:
3333
IpTree();
34+
IpTree(const IpTree&) = delete;
35+
IpTree& operator=(const IpTree&) = delete;
3436
~IpTree();
3537

3638
bool contains(const std::string &ip);

src/variables/rule.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class Rule_DictElement : public VariableDictElement { \
3838
: VariableDictElement(m_rule, dictElement) { }
3939

4040
static void id(Transaction *t,
41-
RuleWithActions *rule,
41+
const RuleWithActions *rule,
4242
std::vector<const VariableValue *> *l) {
43-
RuleWithActions *r = rule;
43+
const RuleWithActions *r = rule;
4444

4545
while (r && r->m_ruleId == 0) {
4646
r = r->m_chainedRuleParent;
@@ -72,9 +72,9 @@ class Rule_DictElement : public VariableDictElement { \
7272

7373

7474
static void severity(Transaction *t,
75-
RuleWithActions *rule,
75+
const RuleWithActions *rule,
7676
std::vector<const VariableValue *> *l) {
77-
RuleWithActions *r = rule;
77+
const RuleWithActions *r = rule;
7878

7979
while (r && !r->hasSeverity()) {
8080
r = r->m_chainedRuleParent;

0 commit comments

Comments
 (0)