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 13, 2024
1 parent c6032ce commit 3f5452e
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 @@ -1258,6 +1258,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 3f5452e

Please sign in to comment.