File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 46
46
<simpara >
47
47
Default DTD attributes
48
48
</simpara >
49
+ <caution >
50
+ <simpara >
51
+ Enabling loading of DTD attributes will enable fetching of external entities.
52
+ The <constant >LIBXML_NO_XXE</constant > constant can be used to prevent this (only available in Libxml > = 2.13.0, as of PHP 8.4.0).
53
+ </simpara >
54
+ </caution >
49
55
</listitem >
50
56
</varlistentry >
51
57
<varlistentry xml : id =" constant.libxml-dtdload" >
57
63
<simpara >
58
64
Load the external subset
59
65
</simpara >
66
+ <caution >
67
+ <simpara >
68
+ Enabling loading of external subsets will enable fetching of external entities.
69
+ The <constant >LIBXML_NO_XXE</constant > constant can be used to prevent this (only available in Libxml > = 2.13.0, as of PHP 8.4.0).
70
+ </simpara >
71
+ </caution >
60
72
</listitem >
61
73
</varlistentry >
62
74
<varlistentry xml : id =" constant.libxml-dtdvalid" >
71
83
<caution >
72
84
<simpara >
73
85
Enabling validating the DTD may facilitate XML External Entity (XXE) attacks.
86
+ The <constant >LIBXML_NO_XXE</constant > constant can be used to prevent this (only available in Libxml > = 2.13.0, as of PHP 8.4.0).
74
87
</simpara >
75
88
</caution >
76
89
</listitem >
Original file line number Diff line number Diff line change 20
20
<para >
21
21
Disable/enable the ability to load external entities.
22
22
Note that disabling the loading of external entities may cause general issues
23
- with loading XML documents. However, as of libxml 2.9.0 entity substitution
23
+ with loading XML documents.
24
+ </para >
25
+ <para >
26
+ As of libxml 2.9.0 entity substitution
24
27
is disabled by default, so there is no need to disable the loading of external
25
28
entities,
26
- unless there is the need to resolve internal entity references with <constant >LIBXML_NOENT</constant >.
29
+ unless there is the need to resolve internal entity references with <constant >LIBXML_NOENT</constant >,
30
+ <constant >LIBXML_DTDVALID</constant >, or <constant >LIBXML_DTDLOAD</constant >.
27
31
Generally, it is preferable to use <function >libxml_set_external_entity_loader</function >
28
32
to suppress loading of external entities.
33
+ The <constant >LIBXML_NO_XXE</constant > constant can be used to prevent this as well (only available in Libxml > = 2.13.0, as of PHP 8.4.0).
29
34
</para >
30
35
</refsect1 >
31
36
99
104
<simplelist >
100
105
<member ><function >libxml_use_internal_errors</function ></member >
101
106
<member ><function >libxml_set_external_entity_loader</function ></member >
102
- <member ><link linkend =" libxml.constants" >The <constant >LIBXML_NOENT</constant > constant</link ></member >
107
+ <member >The <constant >LIBXML_NOENT</constant > constant</member >
108
+ <member >The <constant >LIBXML_DTDVALID</constant > constant</member >
109
+ <member >The <constant >LIBXML_NO_XXE</constant > constant</member >
103
110
</simplelist >
104
111
</para >
105
112
</refsect1 >
You can’t perform that action at this time.
0 commit comments