Skip to content

Commit

Permalink
DO NOT MERGE: Add validation for eternal enities
Browse files Browse the repository at this point in the history
https://bugzilla.gnome.org/show_bug.cgi?id=780691

Bug: 36556310
Change-Id: I9450743e167c3c73af5e4071f3fc85e81d061648
(cherry picked from commit bef9af3d89d241bcb518c20cba6da2a2fd9ba049)
  • Loading branch information
Brian C. Young authored and andi34 committed Jun 16, 2017
1 parent f854f3d commit feeb1ee
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions parser.c
Expand Up @@ -7699,6 +7699,14 @@ xmlParsePEReference(xmlParserCtxtPtr ctxt)
if (xmlPushInput(ctxt, input) < 0)
return;
} else {
if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) &&
((ctxt->options & XML_PARSE_NOENT) == 0) &&
((ctxt->options & XML_PARSE_DTDVALID) == 0) &&
((ctxt->options & XML_PARSE_DTDLOAD) == 0) &&
((ctxt->options & XML_PARSE_DTDATTR) == 0) &&
(ctxt->replaceEntities == 0) &&
(ctxt->validate == 0))
return;
/*
* TODO !!!
* handle the extra spaces added before and after
Expand Down

0 comments on commit feeb1ee

Please sign in to comment.