Finish XMLArgs processing

This commit is contained in:
Ervin Hegedus
2024-09-30 18:53:19 +02:00
parent fa621f81e9
commit 0c8cc6e2cf
5 changed files with 306 additions and 21 deletions

View File

@@ -20,15 +20,36 @@ typedef struct xml_data xml_data;
#include "modsecurity.h"
#include <libxml/xmlschemas.h>
#include <libxml/xpath.h>
#include <libxml/SAX.h>
/* Structures */
struct msc_xml_parser_state {
apr_array_header_t * has_child_stack;
unsigned int depth;
unsigned int pathlen;
char * currpath;
char * currval;
size_t currpathbufflen;
apr_pool_t * mp;
};
typedef struct msc_xml_parser_state msc_xml_parser_state;
struct xml_data {
xmlSAXHandler *sax_handler;
xmlParserCtxtPtr parsing_ctx;
xmlDocPtr doc;
unsigned int well_formed;
/* error reporting and XML array flag */
char *xml_error;
/* another parser context for arguments */
xmlParserCtxtPtr parsing_ctx_arg;
/* parser state for SAX parser */
msc_xml_parser_state *xml_parser_state;
};
/* Functions */