mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Second part of IIS/nginx merge into M2 trunk.
This commit is contained in:
@@ -21,7 +21,7 @@ CC = CL
|
||||
|
||||
MT = mt
|
||||
|
||||
DEFS = /nologo /O2 /LD /W3 /wd4244 /wd4018 -DWIN32 -DWINNT -Dinline=APR_INLINE
|
||||
DEFS = /nologo /O2 /LD /W3 /wd4244 /wd4018 -DWIN32 -DWINNT -Dinline=APR_INLINE -D$(VERSION)
|
||||
|
||||
DLL = mod_security2.so
|
||||
|
||||
|
@@ -222,7 +222,7 @@ int perform_interception(modsec_rec *msr) {
|
||||
/* ENH This does not seem to work on Windows. Is there a
|
||||
* better way to drop a connection anyway?
|
||||
*/
|
||||
#ifndef WIN32
|
||||
#if !defined(WIN32) && defined(ALLOW_ACTION_DROP)
|
||||
{
|
||||
extern module core_module;
|
||||
apr_socket_t *csd = ap_get_module_config(msr->r->connection->conn_config,
|
||||
|
@@ -49,7 +49,19 @@
|
||||
MODSEC_VERSION_SUFFIX
|
||||
|
||||
/* Apache Module Defines */
|
||||
#ifdef VERSION_IIS
|
||||
#define MODSEC_MODULE_NAME "ModSecurity for IIS"
|
||||
#else
|
||||
#ifdef VERSION_NGINX
|
||||
#define MODSEC_MODULE_NAME "ModSecurity for nginx"
|
||||
#else
|
||||
#ifdef VERSION_STANDALONE
|
||||
#define MODSEC_MODULE_NAME "ModSecurity Standalone"
|
||||
#else
|
||||
#define MODSEC_MODULE_NAME "ModSecurity for Apache"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#define MODSEC_MODULE_VERSION MODSEC_VERSION
|
||||
#define MODSEC_MODULE_NAME_FULL MODSEC_MODULE_NAME "/" MODSEC_MODULE_VERSION " (http://www.modsecurity.org/)"
|
||||
|
||||
|
@@ -30,8 +30,15 @@
|
||||
|
||||
#ifdef WIN32
|
||||
#include <ws2tcpip.h>
|
||||
// This is a trick: for ModSecurity modules this will declare inet_pton,
|
||||
// but for mymodule.cpp (IIS module) this will skip, because we include
|
||||
// windows.h before including msc_util.h
|
||||
// Without the trick we have redefinition conflict.
|
||||
//
|
||||
#if !(NTDDI_VERSION >= NTDDI_VISTA)
|
||||
int DSOLOCAL inet_pton(int family, const char *src, void *dst);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
char DSOLOCAL *m_strcasestr(const char *haystack, const char *needle);
|
||||
|
||||
|
@@ -1209,7 +1209,7 @@ static apr_status_t msre_action_ctl_execute(modsec_rec *msr, apr_pool_t *mptmp,
|
||||
p2 = apr_strtok(NULL,";",&savedptr);
|
||||
|
||||
if (msr->txcfg->debuglog_level >= 4) {
|
||||
msr_log(msr, 4, "Ctl: ruleUpdateTargetById id=%s targets=%s", p1, p2);
|
||||
msr_log(msr, 4, "Ctl: ruleRemoveTargetById id=%s targets=%s", p1, p2);
|
||||
}
|
||||
re = apr_pcalloc(msr->mp, sizeof(rule_exception));
|
||||
re->type = RULE_EXCEPTION_REMOVE_ID;
|
||||
@@ -1251,7 +1251,7 @@ static apr_status_t msre_action_ctl_execute(modsec_rec *msr, apr_pool_t *mptmp,
|
||||
p2 = apr_strtok(NULL,";",&savedptr);
|
||||
|
||||
if (msr->txcfg->debuglog_level >= 4) {
|
||||
msr_log(msr, 4, "Ctl: ruleUpdateTargetByMsg msg=%s targets=%s", p1, p2);
|
||||
msr_log(msr, 4, "Ctl: ruleRemoveTargetByMsg msg=%s targets=%s", p1, p2);
|
||||
}
|
||||
|
||||
re = apr_pcalloc(msr->mp, sizeof(rule_exception));
|
||||
|
Reference in New Issue
Block a user