1434 Commits

Author SHA1 Message Date
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
Felipe Zimmerle
1cde4d2dd9 Organizes all Makefile.am
Now using one file per line (sorted). This is the better way
to handle it, since it reduces the possibility of merge conflicts.
2013-12-13 09:44:51 -08:00
Felipe Zimmerle
351b9cc357 nginx: generates config file using configure input.
The nginx config file was looking for depedencies by its own,
by doing that it was ignoring the options that were passed to
configure script. This commit deletes this config file and adds
a meta-config which is populated by configure whenever the
standalone-module is enabled.
2013-12-12 15:35:01 -08:00
Felipe \"Zimmerle\" Costa
da16d9e5d5 nginx: adds lua support 2013-12-12 14:53:49 -08:00
Felipe \"Zimmerle\" Costa
5046c8327e iis: Cosmetics fixies on sqli.
This is needed to get it compiled with VS2011 on Windows8
2013-12-12 14:53:49 -08:00
Felipe Zimmerle
ae252ee876 Regression tests: makes configuration compatible with 2.2 and 2.4 (try 2) 2013-12-12 14:53:49 -08:00
Felipe Zimmerle
65d9272fdc nginx: Trying apxs and apxs2 while compiling nginx module 2013-12-12 14:53:49 -08:00
Felipe Zimmerle
35fd75d859 nginx: Trying apxs and apxs2 while compiling nginx module 2013-12-12 14:53:49 -08:00
Felipe Zimmerle
751a9f4e45 macos: Using glibtoolize instead of libtoolize 2013-12-12 14:53:49 -08:00
Felipe Zimmerle
6fc4cac37a regression-tests: makes configuration compatible with 2.2 and 2.4 2013-12-12 14:53:49 -08:00
Felipe Zimmerle
e9813cd0d9 Regression test: get it working with apache 2.4
Changes in httpd.conf.in to get it working with apache 2.4
2013-12-12 14:53:49 -08:00
Felipe \"Zimmerle\" Costa
7366f35c1d Code cosmetics.
Changed to reduce the number of possible fails during
Build Bot compilation.
2013-12-12 14:53:32 -08:00
Felipe \"Zimmerle\" Costa
9bf2959c91 iis: Waiting for 5 seconds before move curl directory
Testing buildbot.
2013-12-12 11:47:11 -08:00
Felipe Zimmerle
f70f6f4281 Redefines unixd_set_global_mutex_perms on tests
Avoding conflicts with the standalone implementation
2013-12-04 19:56:54 -08:00
Felipe Zimmerle
cef72855e4 test: Avoids conflict of fuctions definition 2013-12-04 18:53:03 -08:00
Felipe Zimmerle
cc982ae42e test: Makes the unit tests to work again
The unit tests was not working due to lack update. This patch adds
the necessary stuff to have it work again.
2013-12-12 11:44:41 -08:00
Felipe \"Zimmerle\" Costa
ad330a44bf iis: Avoids directory link while building
Build scripts was creating links allowing the project to
be loaded into Visual Studio without care about the
dependencies versions. Sometimes windows refuse to delete
those links leading the script to fail. This patch
moves the sources directories instead of create links
to it.
2013-12-12 11:43:11 -08:00