46 Commits

Author SHA1 Message Date
Felipe Zimmerle
0787b45481 Adds support to JSON parser in the nginx module
Building with --enable-standalone-module was failing due
the lack of the reference to the msc_json.c file inside the
standalone/Makefile.am. This patch also place the dependency
of the yajl to the nginx module config script.
2014-03-31 16:22:09 -07:00
Felipe Zimmerle
8d4c3e4f5c Makes the build system to look for yajl using a macro file
Now searching for yajl using find_yajl.m4 macro file instead
of using pkg-config directly. If YAJL was not found or if it
was disabled in the configure phase, the code will be compiled
without JSON support.
2014-03-31 16:22:09 -07:00
Felipe "Zimmerle" Costa
20014c808c Adds modsecStatusEngineCall to standalone API
In ModSecurityIIS the configuration is loaded upon the first request
is received. In other words, SecStatusEngine value can be only
loaded once the first request hit the server, and so, the status
function was moved to proceed just after the configuration got loaded.
This update is IIS only.
2014-03-31 07:14:55 -07:00
Felipe Zimmerle
0c6a661c69 First version of the status engine implementation
The Status Engine allow the measurements of how many ModSecurity
instances are running around the world, as long as information
on how many times it had been restarted and so on. Everytime that
the server is started it perform a DNS query that is redirected
to our servers, that query constains information about the
ModSecurity version and it dependencies versions. It also sends a
unique indetification generate locally for the server, avoiding
counting the same server twice while generating the statistics.
This id is a sha-1 hash of the machine name + mac address of the
first network adapter. In this commit it is enabled by default,
in the release will be a configuration option to disable this
functionality. It also important to cite that the information
gather by this query will be also available in ModSecurity website
public open via a JSON stateless API. There will be an fancy
heatmap as well.
2014-03-31 07:14:55 -07:00
David Andrews
dda91f1689 Standalone: independently destroy the connection and request pools
Add independent modsecFinishConnection API that allows you to independently
destroy the connection and request pools. This is to facilitate reuse of a
connection for multiple requests.
2014-03-03 14:17:00 -08:00
David Andrews
27dd513ab6 Flip allocations that happen during initialization (typically) over to use non-global apr memory pools. 2014-03-03 08:00:53 -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
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
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
e3c19d53d2 Removes standalone/Makefile.in
Makefile.in is recommended to be in the repository whenever it is edit manually,
in our case the automatically generated Makefile.in is ok.
2013-12-12 10:47:44 -08:00
Breno Silva
88a9282c6b standalone: fix mutex compilation error with apache 2.4 2013-07-21 13:18:31 -07:00
Breno Silva
b362ab0d98 Fix standalone makefile.am 2013-06-12 07:41:58 -07:00
Nick Galbreath
69b1095947 fix makefiles 2013-06-04 11:12:45 +09:00
Breno Silva
aa18ec7f45 Updated copyright dates 2013-04-19 03:20:46 -04:00
Breno Silva
417d7daf20 Added Libjection 2013-04-18 22:51:07 -04:00
Breno Silva
d8262fc6cf Fixed: standalone Makefile.am 2013-04-04 11:02:18 -04:00
chaizhenhua
5ce1818a9a Nginx Fixed if "master_process off" is set nginx will crash at exit 2013-04-04 21:42:05 +08:00
chaizhenhua
088c660d58 Improved build script 2013-03-31 15:24:45 +08:00
chaizhenhua
a87b06f9f0 Nginx: Fixed config file 2013-03-28 10:11:28 +08:00
Breno Silva
a77e5dc0f9 Merge pull request #48 from gwroblew/remotes/trunk
Fixed config.c to compile on Unix.
2013-03-27 14:50:12 -07:00
Greg Wroblewski
b7d3a084c2 Fixed config.c to compile on Unix. 2013-03-27 14:31:19 -07:00
Greg Wroblewski
a47a4ce4f9 Fixed two crashing bugs: race condition when module was initialized and failing config commands in libapr. 2013-03-23 23:01:26 -07:00
Breno Silva
2fcc08952b Nginx: fix makefile 2013-03-23 12:33:44 -04:00
Breno Silva
f73635ab53 Merge pull request #45 from gwroblew/remotes/trunk
Fixed two crashing bugs: race condition when module was initialized and ...
2013-03-25 07:23:37 -07:00
chaizhenhua
177b5b9c98 Nginx: Added SecDisableBackendCompression support
Nginx: Added internel redirected request processing
2013-03-22 14:42:56 +08:00
Breno Silva
f9b113b869 Nginx: fixed compiling with lua 2013-01-30 20:56:54 -04:00
Breno Silva
4a8e536b0b Nginx: fixed SecRequestBodyAccess 2013-01-30 16:51:42 -04:00
chaizhenhua
1a89b6b8a6 Fixed deny not work in response phase, Fixed debug log message 2013-01-31 09:09:28 +08:00
chaizhenhua
65d889664c Fixed Action Deny not Work 2013-01-27 18:42:39 +08:00
chaizhenhua
972d9e2abf Added Response Phase for Nginx 2013-01-26 22:44:54 +08:00
chaizhenhua
48bd09939f dos2unix standalone/api.c 2013-01-26 22:17:52 +08:00
Greg Wroblewski
c53e743c86 IIS version improvements 2013-01-18 11:39:05 -08:00
Chai Zhenhua
fc7b3ef223 Fixed valgrind complain 2013-01-06 13:47:52 +08:00
chaizhenhua
6815d17690 Added drop action for nginx 2012-12-20 12:32:58 +08:00
Greg Wroblewski
a4c75689fd remotestrunk 2012-11-13 12:54:54 -08:00
Greg Wroblewski
74b8daaadd Fixed crash with invalid commands and marked IIS server as non-virtual, so many commands would work (like SecDataDir). 2012-11-08 23:49:04 -08:00
gregwroblewski
72b0791391 Minor fix, two functions name change. 2012-10-15 18:45:32 +00:00
gregwroblewski
6900616faf Standalone: added Include command
IIS: added locking, response processing check, fixed file chunk reading bugs
2012-10-12 06:27:22 +00:00
gregwroblewski
e4d2dabe08 Improved IIS build process and more fixes to handle Apache 2.4. 2012-09-02 07:28:07 +00:00
gregwroblewski
3425aa9b4f Fixing Apache 2.2 build. 2012-08-30 19:23:46 +00:00
alancsilva
d5ccfbafcb Fix compilation issues in server.c 2012-08-30 13:20:58 +00:00
gregwroblewski
092559a585 Added missing functions to make non-Apache versions compile with Apache 2.4. 2012-08-29 23:53:23 +00:00
brenosilva
d36120b417 Fix compilation issues in server.c and config.c 2012-08-23 16:49:53 +00:00
brenosilva
ada16d3e91 Fix compilation issues in server.c. Looks like unixd_config is different in apache major and minor versions 2012-08-23 01:35:44 +00:00
brenosilva
054e015ded Fix compilation issues in api.c 2012-08-22 14:25:09 +00:00
gregwroblewski
2dbe4ab4f0 Second part of IIS/nginx merge into M2 trunk. 2012-08-20 20:31:06 +00:00