mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Fixed XML multithreading crash. See #501.
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,6 +1,9 @@
|
|||||||
30 May 2008 - trunk
|
30 May 2008 - trunk
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
* Fixed issue with multithreaded servers where concurrent XML processing
|
||||||
|
could crash the web server (at least under Windows).
|
||||||
|
|
||||||
* Fixed blocking in phase 3.
|
* Fixed blocking in phase 3.
|
||||||
|
|
||||||
* Persistent counter updates are now atomic.
|
* Persistent counter updates are now atomic.
|
||||||
|
@@ -15,6 +15,7 @@
|
|||||||
#include "modsecurity.h"
|
#include "modsecurity.h"
|
||||||
#include "msc_parsers.h"
|
#include "msc_parsers.h"
|
||||||
#include "msc_util.h"
|
#include "msc_util.h"
|
||||||
|
#include "msc_xml.h"
|
||||||
|
|
||||||
modsec_build_type_rec DSOLOCAL modsec_build_type[] = {
|
modsec_build_type_rec DSOLOCAL modsec_build_type[] = {
|
||||||
{ "-dev", 1 }, /* Development build */
|
{ "-dev", 1 }, /* Development build */
|
||||||
@@ -121,6 +122,9 @@ int modsecurity_init(msc_engine *msce, apr_pool_t *mp) {
|
|||||||
* Performs per-child (new process) initialisation.
|
* Performs per-child (new process) initialisation.
|
||||||
*/
|
*/
|
||||||
void modsecurity_child_init(msc_engine *msce) {
|
void modsecurity_child_init(msc_engine *msce) {
|
||||||
|
/* Need to call this once per process before any other XML calls. */
|
||||||
|
xmlInitParser();
|
||||||
|
|
||||||
if (msce->auditlog_lock != NULL) {
|
if (msce->auditlog_lock != NULL) {
|
||||||
apr_status_t rc = apr_global_mutex_child_init(&msce->auditlog_lock, NULL, msce->mp);
|
apr_status_t rc = apr_global_mutex_child_init(&msce->auditlog_lock, NULL, msce->mp);
|
||||||
if (rc != APR_SUCCESS) {
|
if (rc != APR_SUCCESS) {
|
||||||
|
Reference in New Issue
Block a user