"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "apache2/modsecurity.c" between
modsecurity-2.9.6.tar.gz and modsecurity-2.9.7.tar.gz

About: ModSecurity is an intrusion detection and prevention module (web application firewall) for the Apache (and Nginx) Web servers.

modsecurity.c  (modsecurity-2.9.6):modsecurity.c  (modsecurity-2.9.7)
/* /*
* ModSecurity for Apache 2.x, http://www.modsecurity.org/ * ModSecurity for Apache 2.x, http://www.modsecurity.org/
* Copyright (c) 2004-2013 Trustwave Holdings, Inc. (http://www.trustwave.com/) * Copyright (c) 2004-2022 Trustwave Holdings, Inc. (http://www.trustwave.com/)
* *
* You may not use this file except in compliance with * You may not use this file except in compliance with
* the License.  You may obtain a copy of the License at * the License.  You may obtain a copy of the License at
* *
*     http://www.apache.org/licenses/LICENSE-2.0 *     http://www.apache.org/licenses/LICENSE-2.0
* *
* If any of the files related to licensing are missing or if you have any * If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc. * other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org. * directly using the email address security@modsecurity.org.
*/ */
skipping to change at line 30 skipping to change at line 30
#include "msc_parsers.h" #include "msc_parsers.h"
#include "msc_util.h" #include "msc_util.h"
#include "msc_json.h" #include "msc_json.h"
#include "msc_xml.h" #include "msc_xml.h"
#include "apr_version.h" #include "apr_version.h"
#ifdef WITH_CURL #ifdef WITH_CURL
#include <curl/curl.h> #include <curl/curl.h>
#endif #endif
#ifdef APLOG_USE_MODULE
APLOG_USE_MODULE(security2);
#endif
unsigned long int DSOLOCAL unicode_codepage = 0; unsigned long int DSOLOCAL unicode_codepage = 0;
int DSOLOCAL *unicode_map_table = NULL; int DSOLOCAL *unicode_map_table = NULL;
/** /**
* Format an alert message. * Format an alert message.
*/ */
const char * msc_alert_message(modsec_rec *msr, msre_actionset *actionset, const char *action_message, const char * msc_alert_message(modsec_rec *msr, msre_actionset *actionset, const char *action_message,
const char *rule_message) const char *rule_message)
{ {
skipping to change at line 564 skipping to change at line 568
if ((msr->txcfg->auditlog_relevant_regex == NULL) if ((msr->txcfg->auditlog_relevant_regex == NULL)
||(msr->txcfg->auditlog_relevant_regex == NOT_SET_P)) ||(msr->txcfg->auditlog_relevant_regex == NOT_SET_P))
{ {
return 0; return 0;
} }
apr_snprintf(buf, sizeof(buf), "%d", status); apr_snprintf(buf, sizeof(buf), "%d", status);
rc = msc_regexec(msr->txcfg->auditlog_relevant_regex, buf, strlen(buf), &my_ error_msg); rc = msc_regexec(msr->txcfg->auditlog_relevant_regex, buf, strlen(buf), &my_ error_msg);
if (rc >= 0) return 1; if (rc >= 0) return 1;
#ifdef WITH_PCRE2
if (rc == PCRE2_ERROR_NOMATCH) return 0;
#else
if (rc == PCRE_ERROR_NOMATCH) return 0; if (rc == PCRE_ERROR_NOMATCH) return 0;
#endif
msr_log(msr, 1, "Regex processing failed (rc %d): %s", rc, my_error_msg); msr_log(msr, 1, "Regex processing failed (rc %d): %s", rc, my_error_msg);
return 0; return 0;
} }
/** /**
* *
*/ */
static apr_status_t modsecurity_process_phase_request_headers(modsec_rec *msr) { static apr_status_t modsecurity_process_phase_request_headers(modsec_rec *msr) {
 End of changes. 4 change blocks. 
1 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)