Felipe Zimmerle
337216fd87
fix: remove target by {id,tag} are now considering collections
...
Fix issue #1409
2017-07-25 09:19:21 -03:00
Felipe Zimmerle
7c2dbf48cf
Typo in the debuglogs for rules::getFinalVars
2017-07-24 22:18:00 -03:00
Felipe Zimmerle
e14dc602e5
Adds support to SecRuleUpdateTargetById
2017-07-04 13:13:13 -07:00
Felipe Zimmerle
fba9c20ea1
Adds initial support to SecRuleUpdateTargetByTag
2017-07-03 17:42:34 -07:00
Felipe Zimmerle
6421ff087a
Forces disruptive to be first-rule-only
...
ModSecurity version 3 is capable to handle disruptive actions in different
rules from the chain. However, lets get it working in the same fashion that
we have in version 2.
2017-04-24 21:06:35 -03:00
Felipe Zimmerle
c7053e572f
Postponing the decision to whenever save or not a log message to the last rule
...
Whenever there is a chained rule, the decision of saving a message on the
webserver's log will be taken after the execution of all actions on the chain,
including the default actions.
2017-03-29 14:51:32 -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
David Testé
cc25390dc9
Fix copy/paste typo
2017-03-06 15:02:03 -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
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
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
f62dc287c9
Uses pointer instead of std::string copies while applying transformations
2016-12-28 20:00:44 -03:00
Felipe Zimmerle
63f3f2fd8b
Avoids unnecessary elapsed time calculations
2016-12-28 20:00:20 -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
bbb61d560c
Changes the saving selection for the audit logs
2016-12-28 17:48:21 -03:00
Felipe Zimmerle
c1e96d6c2b
Fix rules messages in the audit logs
2016-12-15 23:11:54 -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
e6b58014db
Cosmetics: Fix some static analysis report
2016-11-29 14:31:15 -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
9116a19bcc
Using the decoded uri in REQUEST_URI instead of the encoded one
2016-11-28 12:20:11 -03:00
Felipe Zimmerle
eecb90cfd0
setvar: needs review
2016-11-28 12:12:04 -03:00
Felipe Zimmerle
c98be42f8f
Limits the transformation output to 80 chars in the debug logs
2016-11-16 15:37:52 -03:00
dkamen
936ec0b479
~Rule will delete chainedRule
...
Came across this memory leak when reloading nginx with hundreds of rule chains
2016-11-10 01:00:44 -03:00
Felipe Zimmerle
3ee7b24928
Adds refCounter to actions
2016-11-08 18:14:34 -03:00
Felipe Zimmerle
2244e874e2
Moves static methods from class String to the namespace string
2016-11-04 16:00:44 -03:00
Felipe Zimmerle
62a0cb468b
Renames utils/msc_string.[h|cc] to utils/string.[h|cc]
2016-11-04 16:00:42 -03:00
Felipe Zimmerle
4ced1d18e0
Using full path in the header inclusion
2016-11-04 14:45:01 -03:00
Felipe Zimmerle
768cc74f0e
Moves RuleMessage to its own file
2016-11-04 11:58:57 -03:00
Felipe Zimmerle
1bf53c0576
Deletes ruleMessage by the end of the rule execution
2016-11-04 01:08:41 -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
73c4d69174
Moves string related functions from utils' to
utils/string'
2016-11-03 10:47:22 -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
8757840bc3
Refactoring on the operators: negation is now being handled globally
...
Other minors changes were also made, including adding the prefix `m_'
to all the members of the class.
2016-10-19 10:30:26 -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
5553b2a5b9
Moves web server message to appropriate place and removing the garbage
2016-09-20 22:23:23 -03:00
Felipe Zimmerle
115afffe33
Cosmetic: Limit the matched log size
2016-09-14 16:29:57 -03:00