256 Commits

Author SHA1 Message Date
Felipe Zimmerle
2408006227
Introduces ActionWithExecution 2020-08-06 23:37:07 -03:00
Felipe Zimmerle
4fef31855c
Removes method isDisruptive from Action class 2020-08-06 23:30:20 -03:00
Felipe Zimmerle
d923c5e0b6
Action: make sure that null constructor is not used 2020-08-06 23:01:00 -03:00
Felipe Zimmerle
139bbf39c6
Computes auditlog during rules load time 2020-08-06 23:00:59 -03:00
Felipe Zimmerle
2c20f365e8
actions: Removes Rule parameter from runtime execute
Generals organization on the Action class
2020-08-06 23:00:59 -03:00
Felipe Zimmerle
c7a78926ee
actions: Compute the rule association during rules load 2020-08-06 23:00:57 -03:00
Felipe Zimmerle
726f0b2b15
Replaces lower case implementation 2020-08-06 21:36:35 -03:00
Felipe Zimmerle
5d2cdd2964
Moves rule* headers to src/ 2020-08-06 21:34:49 -03:00
Felipe Zimmerle
3d27eff7cc
Cleanup on Action class 2020-08-06 21:34:49 -03:00
Felipe Zimmerle
710e2a7f30
Removes RuleMessage from action execute signature 2020-08-06 21:34:49 -03:00
Felipe Zimmerle
dd3801eba5
Refactoring: Makes transformations to work with new execute signature 2020-08-06 21:34:48 -03:00
Felipe Zimmerle
04deed0662
Cosmetics: fix some cppcheck complains 2020-08-06 21:34:45 -03:00
Felipe Zimmerle
b29cb45df0
Refactoring: rename evaluate to execute on actions 2020-08-06 21:33:12 -03:00
Felipe Zimmerle
23710f9bfb
Refactoring in the Rule class to make it more elegant 2020-08-06 21:33:11 -03:00
Felipe Zimmerle
e0dc84cba5
Adds new method for rule merge
IMPORTANT: SecDefaultAction specified on a child configuration will
overwrite the ones specified on the parent; Previously it was
concatenating.
2020-08-06 21:33:08 -03:00
Felipe Zimmerle
5dd7860f95
Moves default actions to be part of the rules 2020-08-06 21:31:35 -03:00
Felipe Zimmerle
59d4268882
Refactoring: renames Rule to RuleWithOperator 2020-03-31 10:00:08 -03:00
Felipe Zimmerle
8eb7b8fe6c
Refactoring: Splits Rule into Rule and RuleWithActions 2020-03-30 20:22:37 -03:00
Felipe Zimmerle
43f8aee6b6
Splits Rule class into: Rule, RuleBase, RuleMarker 2020-03-30 20:21:36 -03:00
Felipe Zimmerle
fda03c0016
Yet another refactoring in Rule 2020-03-30 15:38:51 -03:00
Felipe Zimmerle
9c526b3647
Avoids copy on the transformation operation 2020-03-27 16:12:55 -03:00
Felipe Zimmerle
6b0ad8049a
Having default actions as o shared pointer 2020-03-26 09:59:57 -03:00
Felipe Zimmerle
6367e6d5e9
Having a class Rules 2020-03-24 17:20:10 -03:00
Felipe Zimmerle
6a742cdf76
Refactoring: Renames RulesProperties to RulesSetProperties 2020-02-17 13:17: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
9101a8ab15
Cosmetics: address cppcheck warnings on src/actions 2020-01-22 10:37:51 -03:00
Felipe Zimmerle
86a5f471a9
Cosmetics: fixed static analysis issues. 2020-01-15 20:35:59 -03:00
martinhsv
0470168056 Fix: audit log data omitted when nolog,auditlog 2020-01-07 11:16:07 -03:00
martinhsv
01c7a2689b
Fix test issue-1974 2019-10-24 09:57:49 -03:00
Felipe Zimmerle
47dd9c5df4
Refactoring on the VariableValue class 2019-06-14 10:13:54 -03:00
Ervin Hegedus
c0142cf326
Changed compared variables of range id intervall in ruleRemoveById ctl action. #2111
* changed the variables in clause
* added test case (@theMiddle)
* fixes #2111
2019-06-04 10:28:30 -03:00
Thierry Fournier
4a3e9734ef
fix/minor: Error encoding hexa decimal
String is defined as an array of char. The char can be negative. The
cast "reinterpret_cast" from char to int keep the negative side, so
the "unsigned char" number 0x91 is negative as "char". When it is
"reinterpret_cast" as integer, it becomes 0xffffff91, so the hexadecimal
display is broken:

   [155493246391.747672] [/absolute?what=badarg2] [9]  T (0) t:hexEncode: "ffffff91ffffffecffffffe6334bffffffebffffff87ffffff9affffff824a06ffffffc33b4cffff (14 characters omitted)"

This patch fix this behavior using classic cast without reinterpret_cast:

   [155493251286.221115] [/absolute?what=badarg2] [9]  T (0) t:hexEncode: "91ece6334beb879a824a06c33b4cb4240e4c6f56"
2019-05-27 17:06:51 -03:00
Felipe Zimmerle
4e76c6adf0
Renames namespace Variables to variables 2019-03-06 15:53:20 -03:00
Felipe Zimmerle
78b7fa4e2c
Adds missing drop.h 2018-12-26 11:05:54 -03:00
Felipe Zimmerle
d00ea5111d
Adds initial support to drop action 2018-12-24 16:35:41 -03:00
Felipe Zimmerle
407b6c0f4b
Fix setenv action to strdup key=variable 2018-11-29 15:18:15 -03:00
Wenfeng Liu
3b3004d24d
Correct the usage of modsecurity::Phases::NUMBER_OF_PHASES 2018-11-27 09:23:00 -03:00
Felipe Zimmerle
ce3abf2626
Adds support to multiple ranges in ctl:ruleRemoveById
Issue #1956
2018-11-26 20:48:18 -03:00
Felipe Zimmerle
e712d30c56
Fix setvar to understand Rule variable in collections
Issue #1961
2018-11-26 19:49:44 -03:00
Victor Hora
ecad8c6c7e Fix buffer size for utf8toUnicode transformation 2018-11-16 14:58:40 -05:00
Felipe Zimmerle
18cdffdbca
Encapsulates int[N] in a class to avoid compilation issues
Depending on the compiler, there may be a compilation issue with the
usage of std::unique_ptr<int[]>. Therefore encapsulating it inside a
regular class.
2018-11-01 11:50:15 -03:00
Victor Hora
e3b9f7c913
Fix SecUnicodeMapFile support
Makes SecUnicodeMapFile read the file and adjust transformation to use the
right variable.
2018-10-31 22:57:39 -03:00
Felipe Zimmerle
e1e8a01ed2
Override the default status code if not suitable to redirect action
Issue #1850
2018-10-30 18:20:23 -03:00
Felipe Zimmerle
448897d297
Marking message as disruptive before generate log msg 2018-10-25 18:04:07 -03:00
Felipe Zimmerle
ef7f65db90
Changes debuglogs schema to avoid unecessary str allocation 2018-10-23 17:00:16 -03:00
Felipe Zimmerle
85ecd190d9
Adds full support to UpdateActionById.
Issue #1800
2018-10-23 16:26:11 -03:00
Felipe Zimmerle
3e8e28da48
Refactoring on the RULE variable 2018-10-23 16:26:11 -03:00
Felipe Zimmerle
bc3d3f1915
Adds support to setenv action
Issue #1044
2018-09-25 10:19:52 -03:00
Felipe Zimmerle
ee50fea266
Handling key exceptions on the variable itself
This is the first step towords to solve #1697
2018-09-24 16:16:30 -03:00