Skip to content

Commit

Permalink
registry: Set libxml2 context options
Browse files Browse the repository at this point in the history
  • Loading branch information
wismill committed Oct 15, 2024
1 parent 5f1b06b commit cd02943
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/registry.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,13 @@ parse(struct rxkb_context *ctx, const char *path,
if (!xmlCtxt)
return false;

#ifdef XML_PARSE_NO_XXE
#define _XML_OPTIONS (XML_PARSE_NONET | XML_PARSE_NOENT | XML_PARSE_NO_XXE)
#else
#define _XML_OPTIONS (XML_PARSE_NONET)
#endif
xmlCtxtUseOptions(xmlCtxt, _XML_OPTIONS);

#ifdef HAVE_XML_CTXT_SET_ERRORHANDLER
/* Prefer contextual handler whenever possible. It takes precedence over
* the global generic handler. */
Expand Down

0 comments on commit cd02943

Please sign in to comment.