430 Commits

Author SHA1 Message Date
Felipe Zimmerle
3d1d0514fd
Fix pass action behaviour: now only ingore actions within the same rule
More details on issue #1152
2016-07-01 11:01:51 -03:00
Felipe Zimmerle
b332018cc2
Adds regressiont test for issue #1152 2016-06-30 23:50:21 -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
90adb53935
Adds support to JSON request body parser 2016-06-29 21:55:41 -03:00
Felipe Zimmerle
193fa2e804
Changes regressions tests to fit the recent modification on the parser 2016-06-24 09:18:48 -03:00
Felipe Zimmerle
02909f7cd8
parser: arbitraty text can be used instead of operator
The usage of an arbitrary text instead operator was expecting that the
arbitrary text start by something different from "@" or "!", now it can
start with anything, including "@", and/or "!". Notice however that
there aren't such thing as a bad  operator. Bad operator will be used as
input of @rx. Issue #1136.
2016-06-22 16:59:50 -03:00
Felipe Zimmerle
0d53dda1a1
Adds support to @unconditionalMatch
Issue #1002
2016-06-21 13:46:55 -03:00
Felipe Zimmerle
60be385ebe
Adds support to the SERVER_NAME variable 2016-06-21 10:53:11 -03:00
Felipe Zimmerle
df1f7c5e08
Adds support to the RESPONSE_PROTOCOL variable 2016-06-21 10:52:18 -03:00
Felipe Zimmerle
b8bd0c5960
API CHANGE: response status is now set on processResponseHeaders
That change was needed to move the variable attribution to earliest
as possible. We also have a new field for HTTP_PROTOCOL version used
on the response.
2016-06-21 09:24:46 -03:00
Felipe Zimmerle
a36b2da86a
Adds support to the STATUS variable 2016-06-20 20:34:39 -03:00
Felipe Zimmerle
56d084a7f4
Adds support the variable rule
Issue #1016
2016-06-20 14:03:45 -03:00
Felipe Zimmerle
45bfb594b9
Adds missing tests cases 2016-06-20 11:35:00 -03:00
Felipe Zimmerle
6052d2628b
Adds support to URLENCODED_ERROR variable 2016-06-20 11:34:43 -03:00
Felipe Zimmerle
c5262d54f2
Fix argument uri decode order
The uri decode happens after the string is splitted, not before.
2016-06-17 15:34:06 -03:00
Alexey Zelkin
647019a804
Use internal PCRE based implementation of regular expressions instead of std C++ regex library.
C++ regex library proven to be unusable for gcc 4.8 and earlier version, so
reimplement code using PCRE library in order to build workable version of
unit_test executable for CentOS 7, RHEL 7, Ubuntu 14 and SUSE Linux 12.
2016-06-16 13:50:50 -03:00
Felipe Zimmerle
1b35e57c4e
Adds more suppressions to the valgrind list
Those are suppressing leaks while the parse fail to load the
rules.
2016-06-16 10:35:25 -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
1e6b40ebea
Fix some improperly formatted test cases 2016-06-14 15:32:37 -03:00
Felipe Zimmerle
8cdb138076
Adds support to make check-valgrind
make check-valgrind is useful to identify any memory related issue.
2016-06-14 14:05:28 -03:00
Felipe Zimmerle
f0155e3f32 Adds support to make check
The regression and unit tests are now integrated with `make check`.
It is possible to use make check -jN to have multiple tests running
in parallel.
2016-06-14 09:47:41 -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
967c8c90f2 Fixed minor behavior on the trasnformations and added sha1-mbedtls 2016-05-30 16:54:13 -03:00
Felipe Zimmerle
f35d28b8d3 Loads the transformations test cases during the unit test
Related to: #1156
2016-05-27 11:03:46 -03:00
Felipe Zimmerle
1fe0e34201 Adds support to sqlHexDecode transformation
Issue #973
2016-05-25 20:19:54 -03:00
Felipe Zimmerle
2b056485d0 Adds support to Utf8ToUnicode transformation
Issue #974
2016-05-25 18:21:26 -03:00
Felipe Zimmerle
d70f08d01e test: Using regexp to transform binary representation into binary blobs 2016-05-25 18:18:55 -03:00
Felipe Zimmerle
7ccf54d330 Adds md5 transformation
Replaced the old md5 implementation by the mbetls one.
2016-05-24 21:28:19 -03:00
Felipe Zimmerle
348cf3bfab Adds support to the REMOTE_USER variable 2016-05-23 18:32:53 -03:00
Felipe Zimmerle
f989ecd5cb Adds support to SecXMLExternalEntity 2016-05-18 17:02:15 -03:00
Felipe Zimmerle
6a7b970fe3 Adds support to ctl:requestBodyProcessor=XML 2016-05-18 10:30:25 -03:00
Felipe Zimmerle
1f45d6cea8 Adds full support to the libxml action
Issue #1148
2016-05-18 09:47:30 -03:00
Felipe Zimmerle
8c714af8e1 Actions refactoring: now there is a clear definiation on the action name 2016-05-17 14:36:59 -03:00
Felipe Zimmerle
1b88947d9b Adds support 'xmlns' action to the libmodsec parser 2016-05-16 18:24:54 -03:00
Felipe Zimmerle
3e8defb853 Adds support to the operator @validateDTD
Further info #1003
2016-05-13 09:20:10 -03:00
Felipe Zimmerle
6a40752500 Adds XML variable, xml body request processor and @validateSchema 2016-05-12 11:11:40 -03:00
Felipe Zimmerle
35636674e3 Adds the missing regression tests for USERID 2016-05-11 20:36:47 -03:00
Felipe Zimmerle
ff9aa5c7cf Adds support to the variable SESSIONID 2016-05-06 14:38:38 -03:00
Felipe Zimmerle
a2a47798e9 Adds support to the collection SESSION and setsid action 2016-05-06 14:38:04 -03:00
Felipe Zimmerle
bc887cdcf2 Fix Valgrind regression test script
Calling the right binary name
2016-05-03 17:40:11 -03:00
Felipe Zimmerle
5643d2fa28 Warming up to the remote collections support
Huge refactoring to have the code in shape to later support the
remote collections with different backends.
2016-05-03 17:39:49 -03:00
Felipe Zimmerle
19137452c4 Updates `secrules-language-tests' reference.
SpiderLabs/ModSecurity#1098
2016-04-04 15:22:24 -03:00
Felipe Zimmerle
e5acc95de8 First version of global' and ip' collections 2016-03-30 18:22:00 -03:00
Felipe Zimmerle
c43391072c Fix some issues reported by the static analysis 2016-03-18 19:37:51 -03:00
Felipe Zimmerle
88ca736543 Avoids the installation of test utilities during `make install'
Those utilities are not interesting for the general usage, most
likekly it will be used by very retrict number of people whom are
likely to compile ModSecurity by their selfs.

This issue was reported on #1083
2016-03-18 14:26:41 -03:00
Felipe Zimmerle
e0926fee37 Fix parser error while dealing with operator negation
This patch closes the issue #960
2016-03-17 18:06:46 -03:00
Felipe Zimmerle
1f68075a28 Process the logging phase on the benchmark utility 2016-02-17 14:39:10 -03:00
Felipe Zimmerle
49fc1f8b79 Fix memory leak on the benchmark utility
Now deleting the transaction object even if there is an intervention
2016-02-16 23:04:07 -03:00
Felipe Zimmerle
a102b5ce2c Improves the method fill the ARGS collection 2016-01-15 10:35:24 -03:00