81 Commits

Author SHA1 Message Date
Felipe Zimmerle
78d9575dd2
Better error handling when loading configurations 2020-12-10 10:10:48 -03:00
Felipe Zimmerle
5bd6c58385
Cosmetics: Defining a type for RuleId 2020-12-10 10:10:48 -03:00
Felipe Zimmerle
999af35e22
Moves rule* headers to src/ 2020-12-10 10:10:47 -03:00
Felipe Zimmerle
da618a6b7d
Cleanup on Action class 2020-12-10 10:10:47 -03:00
Felipe Zimmerle
68f85628dd
Refactoring: Makes transformations to work with new execute signature 2020-12-10 10:10:47 -03:00
Felipe Zimmerle
6a742cdf76
Refactoring: Renames RulesProperties to RulesSetProperties 2020-02-17 13:17:03 -03:00
Felipe Zimmerle
22ec307739
Fix 7495675d540b3b3ccce681773205a4fe34daeb64 2020-02-12 08:56:03 -03:00
Felipe Zimmerle
7495675d54
Refactoring: Renames Rules to RulesSet
RulesSet does not only contain rules but alse properties
2020-02-11 14:26:47 -03:00
Felipe Zimmerle
357c140003
Changens copyright year 2020-01-31 10:32:37 -03:00
Felipe Zimmerle
fe98ce4c7d
Cosmetics: address cppcheck warnings 2020-01-30 18:19:34 -03:00
Ervin Hegedus
db298696fa Adds missing check for runtime ctl:ruleRemoveByTag 2019-05-30 09:50:56 -03:00
Wenfeng Liu
3b3004d24d
Correct the usage of modsecurity::Phases::NUMBER_OF_PHASES 2018-11-27 09:23:00 -03:00
Felipe Zimmerle
ef7f65db90
Changes debuglogs schema to avoid unecessary str allocation 2018-10-23 17:00:16 -03:00
Felipe Zimmerle
c721e101c0
Adds request IDs and URIs to the debug log 2018-09-24 21:07:11 -03:00
Felipe Zimmerle
f928e44765
Revert "Fix memory leak in msc_rules_* C APIs"
This reverts commit 58701e7e11a4f65ee5edc2c142c507e578ff7c1b.

It was breaking the multi-thread examples.
2018-05-28 18:59:55 -03:00
Wenfeng Liu
58701e7e11
Fix memory leak in msc_rules_* C APIs 2018-05-24 12:51:13 -03:00
Felipe Zimmerle
6f92c8914a
Disables skip counter if debug log is disabled 2018-04-24 14:17:01 -03:00
Felipe Zimmerle
0ca5994744
Adds support for ctl:ruleRemoveByTag action 2018-03-26 17:01:53 -03:00
Felipe Zimmerle
4ac14a2622
Cosmetics on top of: #1636 2018-02-28 11:03:19 -03:00
Minasu
a0bea7356d
Correction remove_by_tag and remove_by_msg 2018-02-28 10:31:45 -03:00
Felipe Zimmerle
3fb71f32d8
Coding style fixes 2017-11-13 22:32:11 -03:00
Felipe Zimmerle
ec667a4609
Adds support for SecRuleRemoveByTag 2017-11-07 14:52:50 -03:00
Felipe Zimmerle
1ad95254cd
Avoids unicode initialization on every rules block
ModSecurity-nginx/#67
ModSecurity/#1563
2017-10-11 12:40:48 -03:00
Felipe Zimmerle
d7eab6b7a3 Adds support to SecRuleRemoveByMsg 2017-08-16 23:42:13 -03:00
Lasse Karstensen
515e073503
Rename FromNowOneAllowType to FromNowOnAllowType.
This misspelling is confusing (is it allow one more rule, or all of
them?) and since v3 isn't released yet, use the major version bump
opportunity to rectify it.
2017-07-28 22:46:55 -03:00
Felipe Zimmerle
dbcf5a7198
API CHANGE: Rules::merge signature was change to includes error msg 2017-03-23 09:52:39 -03:00
Felipe Zimmerle
e2af60e765
Expands log_cb to share ruleMessage structure instead text
Text version still available and it is the default options
2017-03-06 15:02:04 -03:00
Felipe Zimmerle
f2d149fc5f
Extends the direct access model to other collections 2017-03-06 15:02:00 -03:00
Felipe Zimmerle
9a1faab668
Deletes driver in case of parser failure
This avoids memory leaks.
2017-03-06 15:01:51 -03:00
Felipe Zimmerle
a8e5cce744
Moving the rules deletion to the RuleProperties class
The deletion was happning on the Rule class due to historical reasons.
The consequence of that was a parser memory leak.
2017-03-06 15:01:51 -03:00
Felipe Zimmerle
60402d8b80
Renames defaultActions to m_defaultActions in RulesProperties 2017-03-06 15:01:50 -03:00
Felipe Zimmerle
7927ddda91
Renames rules to m_rules in RulesProperties 2017-03-06 15:01:50 -03:00
Felipe Zimmerle
a7f465cf3a
Avoids string copy by working with pointers while resolving variables 2016-12-28 20:00:14 -03:00
Felipe Zimmerle
2e9a35c358
Refactoring on the audit logs implementation
Among of other things, it is now supporting shared file locks between
different process.
2016-12-14 23:17:28 -03:00
David Testé
89987806cd
Add (void) argument to be ANSI C compliant
Add void argument has to avoid warning messages when compiling python
bindings with CFFI since it uses -Wstrict-prototypes option by default.

Modify`msc_create_rules_set` and `msc_init` internals, now it returns
directly an instance like `msc_new_transaction` in transaction.cc.
2016-12-01 15:32:29 -03:00
Felipe Zimmerle
bfc30dad34
Refactoring: how to report to error logs 2016-12-01 01:05:29 -03:00
David Testé
85edff522d
Fix return value of msc_rules_merge()
Regarding to the documentation msc_rules_merge() should
return the number of merged rules instead of 0 in all cases.
2016-11-14 10:23:51 -03:00
Felipe Zimmerle
3ee7b24928
Adds refCounter to actions 2016-11-08 18:14:34 -03:00
Felipe Zimmerle
4ced1d18e0
Using full path in the header inclusion 2016-11-04 14:45:01 -03:00
Felipe Zimmerle
507ec44cc2
Refactoring on `utils.cc' and adjacents
Completely removed the `utils.cc' by moving residual functions into
sub-classes of `utils/'
2016-11-03 20:26:27 -03:00
Felipe Zimmerle
b48e4b3a37
refactoring: Moves Phases enum to outside ModSecurity class 2016-10-07 19:05:50 -03:00
Felipe Zimmerle
c680ddf2cd
Refactoring on rulesProperties class
Among of other things the merge process was improved to detect if
certain properties were set on the origin rule set.
2016-10-05 12:01:15 -03:00
Felipe Zimmerle
13b6a3ecf6
Fix: Rules ID are validated during a set merge
Further info at: #1192
2016-09-23 16:28:47 -03:00
Felipe Zimmerle
0a22f880dd
Adds support to custom operator's message in case of a match 2016-09-12 15:49:20 -03:00
Felipe Zimmerle
37079ef668
Adds support to SecRuleRemoveById 2016-07-18 15:02:38 -03:00
Felipe Zimmerle
f72bd587ec
Adds support to the allow action 2016-06-30 20:44:51 -03:00
Felipe Zimmerle
b0f69b1262
Adds support to the `skip' action 2016-06-30 10:35:42 -03:00
Felipe Zimmerle
9919026620
Fixes regarding memory management
Fixes assorted issues identified by valgrind.
2016-06-16 00:03:57 -03:00
Felipe Zimmerle
2e3da7ea24 Better support for multipart
ModSecurity v2.x parser was ported into 3.x branch.

All the multipart related variables should be workbale.
2016-06-10 09:40:08 -03:00
Felipe Zimmerle
f989ecd5cb Adds support to SecXMLExternalEntity 2016-05-18 17:02:15 -03:00