1450 Commits

Author SHA1 Message Date
Torben Hansen
ab9aede2e5 Update status code for rule 200002
Removed the non standard compliant HTTP response status code 44 and replaced it with a 400 response status code. Refs #665
2014-02-25 15:44:40 +01:00
Felipe Zimmerle
063dd640e5 Adds internal error messages while parsing the configutarion
Before this patch, if something went wrong while loading the configuration in
memory, not in terms of syntax but other run time factors such as memory
allocation, the webserver will refuse to start and no further message was given
to the user. This patch adds "Internal Error messages" that are intend to let
the user know more information about the problem that he/she is facing.
2014-02-24 03:56:17 -08:00
Felipe Zimmerle
da2ec008bd Fixes a typo on the README.txt
Minor typo in the README.txt file, there was a double "h" in the
begining of an http address. The OWASP Core Rule Set Project
address was placed in an unique line, so that, the link will be
no longer broken on project's main page at GitHub.
2014-02-10 03:27:42 -08:00
Felipe Zimmerle
1694a0cf34 Merge branch 'nginx_regression' 2014-01-17 22:07:50 -08:00
Felipe Zimmerle
f043ba33a3 Adds .a to the list of expected liblua extension
While download and installed on MacOS, liblua5.1, by default, place
itself, under the folder /usr/local/lib with the extension: .a.
2014-01-18 01:29:02 -03:00
Felipe Zimmerle
5d2e3d4321 test: 10-misc-directives.t is not considering log anymore
In this case the new server name is expected to be logged, only in the Apache
version or the debug version of Nginx. The test is still valid, in the sense
that it is checking for the server response, expecting the new "Server:"
header.
2014-01-17 13:02:48 -08:00
Felipe Zimmerle
8804b55cdd test: Makes regression test mac friendly
Apache configuration was updated and the configure script is using
an alternative way to discovery the libexecdir.
2014-01-17 11:24:53 -08:00
Felipe Zimmerle
8314791c9e test: nginx: Adds timeout while listening for a socket. 2014-01-16 20:22:38 -08:00
Felipe Zimmerle
215042af21 test: nginx: Points the !# to envoriment.
Instead of using a hardcoded path to Perl, using what is provided by the
environment. Avoiding problems with MacOS, where two different
versions of Perl are expected. One provided by the system and other
by MacOS ports.
2014-01-16 10:31:59 -08:00
Felipe Zimmerle
d26e639512 test: nginx: Speeds up regression test in nginx.
Instead of use `sleep` it nows parser the nginx logs to figure out
whenever it start or stop. Audit log timeout was reduced to 8 seconds.
2014-01-16 10:30:23 -08:00
Felipe Zimmerle
fe14d9df4d nginx: Considering modsec state before apply any rules
For some reason the state of modsec (enable, disable or detecting only) was not
being checked under certain circumstances. For instance, while reading the
body. This was leading ModSecurity to fail and consequently nginx. This patch
added the to standalone implementation mechanism to verify the state that is now
verified under the nginx module.
2014-01-13 18:44:47 -08:00
Felipe Zimmerle
9bf1f6a2b3 test: removes uncessary ifDefine at 10-tfn-cache.t
IfDefines such as: <IfDefine MODSEC_2.5> are just compatible with Apache a
solution to check if some resource is available or not have to be developed
to be used in situations like that. This commit just removes the IfDefine.
2014-01-13 08:11:42 -08:00
Felipe Zimmerle
94097103c8 test: nginx: Adds missing environment variables.
Added the following environment variables:
 - DATA_DIR
 - TEMP_DIR
 - UPLOAD_DIR
These were needed by the testing framework, as the name explains.
2014-01-13 05:44:28 -08:00
Felipe Zimmerle
6c106b1fd7 test: disabling: SecAuditLogType Concurrent
The test is making usage of a custom script, which is not functional in
in Nginx due to timing issues. Disabling it for now until we came up
with a solution that works for every port/version.
2014-01-13 05:44:28 -08:00
Felipe Zimmerle
8e390899e0 test: nginx: Increses the timeout while reading the audit log.
Audit logs are taking too long to be written on the disk. One of the
consequence of that is to have tests that demands to read from audit
log failing. Increase the timeout makes it wait a little bit more for
the logs before gave up.
2014-01-13 05:44:14 -08:00
Felipe Zimmerle
3cf1701794 test: Adds loading tests also to nginx.
It was trying to match "ModSecurity for Apache.* configured". This patch
makes it expect for "ModSecurity for nginx.* configured" while nginx
version is being used/tested.
2014-01-09 12:13:47 -08:00
Felipe Zimmerle
795d6a64d2 nginx: Warn about not workable 'proxy'
Proxy is not yet ready for nginx. Instead of give a generic error, this patch
adds a clean message explains that such functionality is not available on the
nginx port. This patch also modifies the test cases to reflect this changes.
2014-01-09 11:12:28 -08:00
Felipe Zimmerle
7478faa5ce test: Adds support to handle different content in log depending on the version
Some functionalities are just enabled on Apache, not part of nginx or IIS. As
example we have the "proxy", currently just supported in Apache. This patches
add to our regression test suite the ability to expect different contents
based on the targert platform.
2014-01-09 09:40:06 -08:00
Felipe Zimmerle
7ac515ee29 nginx: Adds proper support to SecServerSignature
SecServerSignature was leading nginx to crash. It was trying to write over a
memory area that it was not allowed to. In order to fix that a new function was
created on the standalone api. This function is called
modsecIsServerSignatureAvailale. Whenever it returns data it means that the
function SecServerSignature was used by the user. Nginx module was also patched
to support this new function.
2014-01-08 18:06:32 -08:00
Felipe Zimmerle
2a43589395 nginx: Removes problematic performance improvement
In an attempt to boost the performance the headers were being checked in two
different situations, the first if SecResponseBodyAccess was Off and in a
second situation if SecResponseBodyAccess was set to On. This makes sense
however functionalities such as content injection demands the body even if
SecResponseBodyAccess was not enabled. This patch removes the first scenario,
leaving just the second one. After this modification the following regression
tests started to pass:

from: regression/action/10-append-prepend.t
  1) action - append content: passed
  2) action - prepend content: passed
2014-01-07 19:26:43 -08:00
Felipe Zimmerle
21e25c50af test: nginx: Adds missing files
This commit is just to circunvent a problem, there is no need to have
those files duplicated in our repository, that will be fixed soon.
2014-01-06 19:52:10 -08:00
Felipe Zimmerle
176396ddc1 tests: nginx: Allow POSTs in static files
By default Nginx does not allow POST in static files, which is very
used by the regression test. This is a ugly hack just to make possible
to gather some numbers. Better solution will arrive soon.
2014-01-06 19:22:27 -08:00
Felipe Zimmerle
e20c800044 nginx: fix missing headers while SecResponseBodyAccess was On
The problem was caused by the fact that ModSecutiry was telling Nginx that
headers had been sent when, in fact, had not. This modification was added in
the past, along with others, in the following commit: fd2c30fa2311e783eecf3bf02bf3dcfbabc3968a
This patch, just removes the "r->header_sent = 1". After that modification
the following regression tests started to work again:

from: action/00-disruptive-actions.t
   3) action - pass in phase:3
   4) action - pass in phase:4
  11) action - deny in phase:3
  12) action - deny in phase:4
  19) action - redirect in phase:3 (get)
  20) action - redirect in phase:4 (get)
  23) action - proxy in phase:3 (get)
  24) action - proxy in phase:4 (get)
from: config/10-response-directives.t
   2) config - SecResponseBodyAccess On
   6) config - SecResponseBodyLimit (greater)
   7) config - SecResponseBodyLimitAction Reject
2014-01-06 19:10:24 -08:00
Felipe Zimmerle
445783d067 tests: Sleeps over 20 seconds if nginx failed to exit immediately
Sometimes nginx failed to exit cleanly in the expected time. This patch adds
the capability to wait for more 20 seconds.
2014-01-03 13:09:44 -08:00
Felipe Zimmerle
fb4e1f1b6b tests: Adds random data to a post making it workable in nginx
For some reason nginx fails in a post with no body. This patch adds some random
data here. Other platforms should not be affected.
2014-01-03 09:36:25 -08:00
Felipe Zimmerle
450d621ca9 tests: adds test-regression-nginx to the makefile
This patch adds the nginx regression test entry to project makefile.
2014-01-03 09:26:30 -08:00
Felipe Zimmerle
96ad8267ee tests: Marks the run-regression-tests-nginx.pl script as executable.
This patch just add +x to  run-regression-tests-nginx.pl.
2014-01-03 09:25:27 -08:00
Felipe Zimmerle
93c5b8c6ac Merge branch 'regression' 2014-01-03 05:20:05 -08:00
Felipe Zimmerle
0ad390d12d Tests: fixes tests/regression/rule/10-xml.t
SecXmlExternalEntity was not informed. By default its value is Off. This patch
set the SecXmlExternalEntity to On in order to load the external resources
needed for this test case.
2014-01-01 20:56:06 -08:00
Felipe Zimmerle
ba0818ca32 tests: cleans up the apache configuration file
Simplified the apache configuration file, so that, we can handle easily
different Apaches versions
2014-01-01 16:09:21 -08:00
Felipe Zimmerle
6325ed8d41 Tests: fixes regression/misc/10-tfn-cache.t
Tests were failing because they were writing wrong/outdated.
2014-01-01 11:49:08 -08:00
Felipe Zimmerle
ddb4fceb63 Tests: fixes regression/rule/20-exceptions.t
Tests were failing because they were writing wrong/outdated.
2014-01-01 11:21:37 -08:00
Felipe Zimmerle
0c99063aae Tests: fixes regression/rule/00-basics.t
Tests were failing because they were writing wrong/outdated.
2014-01-01 11:02:20 -08:00
Felipe Zimmerle
7c9ebfeb20 Tests: fixes regression/action/10-logging.t
Tests were failing because they were writing wrong/outdated.
2014-01-01 10:52:44 -08:00
Felipe Zimmerle
11287a6b95 test: fixes regression/misc/00-multipart-parser.t
Tests were failing because they were writing wrong/outdated.
2014-01-01 10:29:21 -08:00
Felipe Zimmerle
b0025c88fa tests: fixes regression/config/10-request-directives.t
Tests were failing because they were writing wrong/outdated.
2014-01-01 10:28:56 -08:00
Felipe Zimmerle
e5560a6a43 tests: fixes regression/config/10-misc-directives.t
SecDefaultAction was failing due to a wrong written test.
2014-01-01 10:00:08 -08:00
Chase Venters
0ddd2b4639 Add mod_extract_forwarded.c to run before mod_security2.c
mod_extract_forwarded2.c is already present in this list, but there is a
(seemingly better) alternative for Apache 2.2 which is distributed in
Fedora EPEL that is called mod_extract_forwarded.c.
2013-12-18 18:05:03 -08:00
ahuango
b788ce2608 Clean the garbage character after the duplicated charset property
Pull request #148 by zimmerle doesn't fix the problem. '\0' in format
string won't be processed by "ngx_vslprintf".
When the garbage character is '\n' or '\r', http response is cracked and
browsers may go crashing.
2013-12-18 16:50:44 -08:00
Nick Galbreath
74ec784005 libinjection sync 2013-12-18 04:19:02 +00:00
Felipe Zimmerle
227de9fb8a Reverts commit b1cbccdc6b18a0f3a4edda8a5dfa9f6621485e81
This belongs to a specific branch as long as it is not stable yet.
2013-12-18 15:05:01 -08:00
Felipe Zimmerle
2f5af6af73 Merge tag 'refs/tags/v2.7.7' 2013-12-18 14:56:22 -08:00
Felipe Zimmerle
87115e770a Adds a default config script to nginx v2.7.7 2013-12-18 03:48:15 -08:00
Felipe Zimmerle
537b85edf8 Changes SecUnicodeMapFile in recommend configuration
The parameter was using a deprecated syntax, now it is fixed.
2013-12-18 03:48:15 -08:00
Felipe Zimmerle
90a44f688d Updates the changes file 2013-12-18 03:48:06 -08:00
Felipe Zimmerle
c473aabb4a Changes release version to 2.7.7
Release version is now 2.7.7.
2013-12-18 03:46:36 -08:00
ivanr
b1cbccdc6b Added new directive (SecPdfProtectMethod) to enable the user to choose between using token redirection (falling back on forced download in some cases) and forced download (in all cases). 2013-12-17 07:14:25 -08:00
David Andrews
9543e136ce Fix typo causing build issues 2013-12-16 19:59:03 -03:00
Felipe Zimmerle
4a7d439de5 Merge branch 'release_2_7_6-rc2'
Release 2.7.6 ready.
2013-12-16 07:10:24 -08:00
Felipe Zimmerle
6d3606aadb Updates CHANGES files.
Contains the CHANGES of the 2.7.6 release.
v2.7.6
2013-12-16 09:47:05 -03:00