Merge 5c6a78cee077622ee85b56ab51f1e81b56878c22 into f3f00e348b65e94c033960513950d7fc375b10df

This commit is contained in:
Erki Aring 2025-09-09 17:36:36 -04:00 committed by GitHub
commit ebabbeda69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -146,6 +146,9 @@ xml_unload_external_entity(const char *URI, xmlCharEncoding enc) {
return NULL; return NULL;
} }
static void xml_error_func(void *ctx, const char *msg, ...) {
//modsec_rec *msr = (modsec_rec *)ctx;
}
/** /**
* Initialise XML parser. * Initialise XML parser.
@ -160,6 +163,8 @@ int xml_init(modsec_rec *msr, char **error_msg) {
msr->xml = apr_pcalloc(msr->mp, sizeof(xml_data)); msr->xml = apr_pcalloc(msr->mp, sizeof(xml_data));
if (msr->xml == NULL) return -1; if (msr->xml == NULL) return -1;
xmlSetGenericErrorFunc(msr, xml_error_func);
if(msr->txcfg->xml_external_entity == 0) { if(msr->txcfg->xml_external_entity == 0) {
entity = xmlParserInputBufferCreateFilenameDefault(xml_unload_external_entity); entity = xmlParserInputBufferCreateFilenameDefault(xml_unload_external_entity);
} }