Commit Graph

1193 Commits

Author SHA1 Message Date
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
Andrei Belov
ae8698d8cf Makes JIT support in PCRE to be optional
In particular, this change allows to build libmodsecurity on some old
but still supported systems such as RHEL/CentOS 6.
2016-09-26 14:50:31 -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
ecd3fd0dc1 build: avoids compilation problems due to non existence of the lmdb.h
Based on: 56abe98cb8c791812d46c0902b4e742c8c39620e by @phantom-az
2016-09-22 10:28:45 -03:00
Felipe Zimmerle
8f5c1c3cf6 parser: avoids parser error while loading an empty file 2016-09-22 10:16:00 -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
16b8ef98fd Fix: placed missing variable initialization 2016-09-19 21:18:00 -03:00
Felipe Zimmerle
56cbbeff52 Adjust the phase value between the core and the rules 2016-09-19 21:17:03 -03:00
Felipe Zimmerle
115afffe33 Cosmetic: Limit the matched log size 2016-09-14 16:29:57 -03:00
Felipe Zimmerle
a1a1c71d6b Makes LMDB support optional 2016-09-13 09:51:03 -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
ad61838118 Considering collection RULE independent of the case at macro expansion 2016-09-12 15:27:03 -03:00
Felipe Zimmerle
241269eede Adds missing `nog_log' action 2016-09-12 10:34:45 -03:00
Felipe Zimmerle
8d84ff6f4d Accepting both: normalizePath and normalisePath 2016-08-26 16:26:16 -03:00
Felipe Zimmerle
fb0afdb34b Fix @validateByteRange initialization 2016-08-26 16:21:05 -03:00
Andrei Belov
ed18c73cda include pre-generated parser sources into the distribution 2016-08-16 20:01:53 -03:00
Felipe Zimmerle
062dd17f14 Cosmetics: reducing the compilation warnings 2016-07-29 18:42:20 -03:00
Felipe Zimmerle
0e5f72977e Changes MATCHED_VAR behaviour
Only cleanup the variable if there wasn't a match within the rule
2016-07-29 10:40:45 -07:00
Felipe Zimmerle
665df04516 Cosmetics: avoid compilation warnings 2016-07-29 11:29:24 -03:00
Felipe Zimmerle
7f7bd99843 Adds missing file: rules_exceptions 2016-07-22 13:35:05 -03:00
Felipe Zimmerle
f723870f18 Fix case sensitive variable resolution in in memory backend
Variables are case insensitive
2016-07-22 13:34:57 -03:00
Felipe Zimmerle
5d64f73817 Makes RULE collection to be resolved inside a macro expansion 2016-07-21 13:09:22 -03:00
Felipe Zimmerle
52808b6cf0 Allows REQUEST_HEADERS:Content-Type to be null
If REQUEST_HEADERS:Content-Type is null, REQBODY_ERROR will be marked as "0"
2016-07-18 21:31:26 -03:00
Felipe Zimmerle
c961373fc1 Adds missing header 2016-07-18 18:03:22 -03:00
Felipe Zimmerle
8416eca98b Initializes m_maturity in the rule class
m_maturity was not initialized in one of the constructors of Rule
2016-07-18 16:19:53 -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
c0ebd45a68 Reduces bison required version to test it over the buildbots 2016-07-14 00:20:01 -03:00
Felipe Zimmerle
4cf6c714ac Cosmetics: Fix coding style 2016-07-12 21:59:17 -03:00
Felipe Zimmerle
4078677b7f Cosmetic changes: applies changes suggested by static analysis 2016-07-12 00:46:12 -03:00
Felipe Zimmerle
3f38b56682 Renames testdb' to modsec-shared-collections' 2016-07-11 14:00:33 -03:00
Andrei Belov
063850a4cb exclude build-time required headers from install target 2016-07-11 11:08:41 -03:00
Andrei Belov
649365481f automake: include all needed files into "make dist" target. 2016-07-11 11:08:41 -03:00
Felipe Zimmerle
ad481be09e lmdb backend: Adds support to select variables using regex 2016-07-11 11:00:06 -03:00
Felipe Zimmerle
de8245d8f9 in-memory backend: Adds support to select variables using regex 2016-07-11 10:59:43 -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
6e4226ee4d Adds support to global collections shared among different process
There is a memory leak in the variable resolution that should be
contained by an internal change in the way that the variables
are resolved.
2016-07-07 23:03:47 -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
Felipe Zimmerle
5daf4873b5 build: Searching for LMDB during the configuration phase 2016-07-05 11:56:19 -03:00
Alexey Zelkin
afd7a21d11 Correctly handle return values from pcre_study(3)
If both function's return value and errptr are NULLs, it means
that pcre_study() does not make sense, so can be ignored.
2016-07-05 11:48:52 -03:00
Felipe Zimmerle
e231503bc9 Simplifies the collection interface 2016-07-05 09:48:58 -03:00
Alexey Zelkin
f43704dbef Add explicit 'return true;' for Transaction::extractArguments()
Unbreaks runtime for FreeBSD 10 (clang generated code)
2016-07-04 22:42:36 -03:00
Alexey Zelkin
45850d17da Fix typo (= vs ==) 2016-07-04 22:42:00 -03:00
Felipe Zimmerle
71acdaf8c5 Accept new line + caridge return in the rules parser 2016-07-01 16:06:34 -03:00
Felipe Zimmerle
578dabea8b Informs the https client a key if any is given 2016-07-01 15:04:17 -03:00
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
f72bd587ec Adds support to the allow action 2016-06-30 20:44:51 -03:00
Felipe Zimmerle
e77e4c4c14 Adds missing test case to Makefile.am and initializes the skip var 2016-06-30 13:46:15 -03:00
Felipe Zimmerle
b0f69b1262 Adds support to the `skip' action 2016-06-30 10:35:42 -03:00
Alexey Zelkin
f00e625c8e Unbreak build with custom location of libyajl.so 2016-06-30 09:41:26 -03:00