Skip to content

Commit 77ae1d1

Browse files
ext/libxml: Add a warning about the usage of LIBXML_PARSEHUGE (#5647)
1 parent 4de6272 commit 77ae1d1

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

reference/libxml/constants.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,13 @@
277277
limits like maximum depth of a document or the entity recursion, as well as limits of the
278278
size of text nodes.
279279
</simpara>
280+
<caution>
281+
<simpara>
282+
Because this relaxes the hardcoded limits, it should only be used with trusted data.
283+
Removing the depth limit on untrusted input can lead to excessive resource consumption,
284+
such as a stack overflow while processing a deeply nested document.
285+
</simpara>
286+
</caution>
280287
<note>
281288
<para>
282289
Only available in Libxml &gt;= 2.7.0 (as of PHP &gt;= 5.3.2 and PHP &gt;= 5.2.12)

0 commit comments

Comments
 (0)