[doc-en] master: ext/libxml: Add a warning about the usage of `LIBXML_PARSEHUGE` (#5647)
| From: | Alexandre Daubois via GitHub | Date: | Thu, 02 Jul 2026 16:28:39 +0000 |
| Subject: | [doc-en] master: ext/libxml: Add a warning about the usage of `LIBXML_PARSEHUGE` (#5647) | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-23432@lists.php.net to get a copy of this message | ||
Author: Alexandre Daubois (alexandre-daubois)
Committer: GitHub (web-flow)
Pusher: jordikroon
Date: 2026-07-02T18:28:36+02:00
Commit: https://github.com/php/doc-en/commit/77ae1d1908566c7d20972011c2ea067480a4f42e
Raw diff: https://github.com/php/doc-en/commit/77ae1d1908566c7d20972011c2ea067480a4f42e.diff
ext/libxml: Add a warning about the usage of
LIBXML_PARSEHUGE (#5647)
Changed paths:
M reference/libxml/constants.xml
Diff:
diff --git a/reference/libxml/constants.xml b/reference/libxml/constants.xml
index c80a5f6d5f0c..d9e844bb193e 100644
--- a/reference/libxml/constants.xml
+++ b/reference/libxml/constants.xml
@@ -277,6 +277,13 @@
limits like maximum depth of a document or the entity recursion, as well as limits of the
size of text nodes.
</simpara>
+ <caution>
+ <simpara>
+ Because this relaxes the hardcoded limits, it should only be used with trusted data.
+ Removing the depth limit on untrusted input can lead to excessive resource consumption,
+ such as a stack overflow while processing a deeply nested document.
+ </simpara>
+ </caution>
<note>
<para>
Only available in Libxml >= 2.7.0 (as of PHP >= 5.3.2 and PHP >= 5.2.12)