313 Commits

Author SHA1 Message Date
Felipe Zimmerle
dbcf5a7198
API CHANGE: Rules::merge signature was change to includes error msg 2017-03-23 09:52:39 -03:00
Felipe Zimmerle
e79712095b
Minor fix in the decision on whenever the log callback should be called 2017-03-06 15:02:04 -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
027d50b76b
Adds first version of `processContentOffset'
This commit also includes an example application on how to use the
`processContentOffset' method.
2017-03-06 15:02:02 -03:00
Felipe Zimmerle
4ad3574cf2
Adds offset regression tests and assorted fixes on var's offsets 2017-03-06 15:02:02 -03:00
Felipe Zimmerle
d851699529
Adds references to the collection variables 2017-03-06 15:02:00 -03:00
Felipe Zimmerle
e95efa05cc
Fix assorted memory and static analysis errors 2017-03-06 15:02:00 -03:00
Felipe Zimmerle
f2d149fc5f
Extends the direct access model to other collections 2017-03-06 15:02:00 -03:00
Felipe Zimmerle
ca24b6bb06
PoC: Adds support to direct access on ARGS collection 2017-03-06 15:01:59 -03:00
Felipe Zimmerle
17e5a63577
Removes memory leak on the "offset" feature 2017-03-06 15:01:59 -03:00
Felipe Zimmerle
c1f11ab4e5
Cosmetics: assorted fixes on the coding style 2017-03-06 15:01:59 -03:00
Felipe Zimmerle
ecbf292f6d
Adds first PoC for the operator offset feature 2017-03-06 15:01:59 -03:00
Felipe Zimmerle
9a8fc3116a
Instantiates the Class variable earlier
Avoid the instantiation for every call
2017-03-06 15:01:59 -03:00
Felipe Zimmerle
e95555132e
Contionuation of 1 time variable patch
Now we have almost 100% of the transaction variables hosted on the
new schema. Variable modifcators (count and exclusion) are not yet
supported on the new schema. Notice that setvar is now using the
parser.
2017-03-06 15:01:58 -03:00
Felipe Zimmerle
703da3c4f0
Adds PoC about 1-time variable resolution and draft for offset
There is no need for the variable purely associated with the
transaction (transient) be part of collection that demands
lookups. Also, those variables will held the concept of offset:
The offset from the first byte of the request till the start of
the variable.
2017-03-06 15:01:52 -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
f62dc287c9
Uses pointer instead of std::string copies while applying transformations 2016-12-28 20:00:44 -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
168fa22e19
Collections cleanup: removes resolveFirstCopy method 2016-12-28 19:56:27 -03:00
Felipe Zimmerle
bbb61d560c
Changes the saving selection for the audit logs 2016-12-28 17:48:21 -03:00
Felipe Zimmerle
9c7416da97
Refactoring the actions classes 2016-12-28 15:20:06 -03:00
Felipe Zimmerle
317808fe54
Adds section "H" to serial audit log 2016-12-16 00:07:15 -03:00
Felipe Zimmerle
c1e96d6c2b
Fix rules messages in the audit logs 2016-12-15 23:11:54 -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
Felipe Zimmerle
64e2927922 Moves debuglog stuff inside the debug_log namespace 2016-12-09 09:52:01 -03:00
Felipe Zimmerle
cce6179dcc
Refactoring: new structure for logging alerts
Disruptive actions were moved to actions::disruptive namespace
2016-12-01 14:14:54 -03:00
Felipe Zimmerle
bfc30dad34
Refactoring: how to report to error logs 2016-12-01 01:05:29 -03:00
Felipe Zimmerle
9bd37ccb63
Refactoring: Rule class 2016-11-28 13:07:25 -03:00
Felipe Zimmerle
a776cce6d7
Changes RULE variable group to be save at transient collection 2016-11-28 13:00:04 -03:00
Felipe Zimmerle
293a849668
Adds m_uri_no_query_string_decoded to transaction 2016-11-22 15:23:47 -03:00
Felipe Zimmerle
3ee7b24928
Adds refCounter to actions 2016-11-08 18:14:34 -03:00
Felipe Zimmerle
768cc74f0e
Moves RuleMessage to its own file 2016-11-04 11:58:57 -03:00
Felipe Zimmerle
4711644600
dds support to CtlRequestBodyAccess 2016-10-28 09:48:10 -03:00
Felipe Zimmerle
fead971558
Cosmetics: Fix typo. Remove not Remote 2016-10-26 11:12:05 -03:00
Felipe Zimmerle
1c21d1aeba
Adds support to action CtlRuleRemoveById 2016-10-26 11:00:18 -03:00
Felipe Zimmerle
161cc36acf
Adds support to action CtlRuleRemoteTargetById 2016-10-26 10:58:42 -03:00
Felipe Zimmerle
9245369a54
Adds support to action CtlRuleRemoteTargetByTag 2016-10-25 15:43:50 -03:00
Felipe Zimmerle
678a97d0f7
Refectoring on the DebugLog mechanism
The DebugLog implementation was modified to use shared memory
to keep the information about the opened files and file handles.
The modification was necessary to avoid race-conditions. This
commit also closes the issue SpiderLabs/ModSecurity-nginx#17
2016-10-18 18:43:51 -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
0a22f880dd
Adds support to custom operator's message in case of a match 2016-09-12 15:49:20 -03:00
Felipe Zimmerle
c3378ec528
Fix the size of the rules and actions vectors 2016-09-01 00:39:54 -03:00
Felipe Zimmerle
5514b66145
Adds missing file: rules_exceptions.h 2016-07-19 13:45:02 -03:00
Felipe Zimmerle
37079ef668
Adds support to SecRuleRemoveById 2016-07-18 15:02:38 -03:00
Felipe Zimmerle
d781b00f70
Fix the `log' action and the webserver error callback 2016-07-16 15:20:31 -03:00
Felipe Zimmerle
4cf6c714ac
Cosmetics: Fix coding style 2016-07-12 21:59:17 -03:00
Felipe Zimmerle
833089eb70
Adds method resolveFirstCopy to collections
Using the copy whenever it is necessary to avoid memory leak.
2016-07-08 10:22:37 -03:00
Felipe Zimmerle
7bcc9cf0d9
Bug fix: variable resolution inside global collections
Collections were being resolved as transient variables.
2016-07-07 10:32:48 -03:00