mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-17 09:55:28 +03:00
Fix libxml2 related deprecated issues
This commit is contained in:
@@ -274,7 +274,6 @@ bool XML::processChunk(const char *buf, unsigned int size,
|
||||
if (m_data.parsing_ctx != NULL &&
|
||||
m_transaction->m_secXMLParseXmlIntoArgs
|
||||
!= RulesSetProperties::OnlyArgsConfigXMLParseXmlIntoArgs) {
|
||||
xmlSetGenericErrorFunc(m_data.parsing_ctx, null_error);
|
||||
xmlParseChunk(m_data.parsing_ctx, buf, size, 0);
|
||||
m_data.xml_parser_state->parsing_ctx_arg = m_data.parsing_ctx_arg;
|
||||
if (m_data.parsing_ctx->wellFormed != 1) {
|
||||
@@ -292,7 +291,6 @@ bool XML::processChunk(const char *buf, unsigned int size,
|
||||
m_transaction->m_secXMLParseXmlIntoArgs
|
||||
== RulesSetProperties::TrueConfigXMLParseXmlIntoArgs)
|
||||
) {
|
||||
xmlSetGenericErrorFunc(m_data.parsing_ctx_arg, null_error);
|
||||
xmlParseChunk(m_data.parsing_ctx_arg, buf, size, 0);
|
||||
if (m_data.parsing_ctx_arg->wellFormed != 1) {
|
||||
error->assign("XML: Failed to parse document for ARGS.");
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifdef WITH_LIBXML2
|
||||
#include <libxml/xmlschemas.h>
|
||||
#include <libxml/xpath.h>
|
||||
#include <libxml/SAX.h>
|
||||
#include <libxml/SAX2.h>
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
@@ -93,10 +93,6 @@ class XML {
|
||||
static xmlParserInputBufferPtr unloadExternalEntity(const char *URI,
|
||||
xmlCharEncoding enc);
|
||||
|
||||
static void null_error(void *ctx, const char *msg, ...) { // cppcheck-suppress[constParameterPointer,constParameterCallback]
|
||||
}
|
||||
|
||||
|
||||
xml_data m_data;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user