-
Notifications
You must be signed in to change notification settings - Fork 752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix GH-1408: Deprecation of libxml_disable_entity_loader() should warn about constants which will override the new default behaviour #4036
Conversation
…warn about constants which will override the new default behaviour Based on stale PR phpGH-1409. Closes phpGH-1409. Closes phpGH-1408. Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Just markup remarks about linking
reference/libxml/constants.xml
Outdated
<caution> | ||
<simpara> | ||
Enabling loading of DTD attributes will enable fetching of external entities. | ||
The <link linkend="constant.libxml-no-xxe"><constant>LIBXML_NO_XXE</constant></link> constant can be used to prevent this (only available in Libxml >= 2.13.0, as of PHP 8.4.0). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linking is automatic now
The <link linkend="constant.libxml-no-xxe"><constant>LIBXML_NO_XXE</constant></link> constant can be used to prevent this (only available in Libxml >= 2.13.0, as of PHP 8.4.0). | |
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). |
reference/libxml/constants.xml
Outdated
<caution> | ||
<simpara> | ||
Enabling loading of external subsets will enable fetching of external entities. | ||
The <link linkend="constant.libxml-no-xxe"><constant>LIBXML_NO_XXE</constant></link> constant can be used to prevent this (only available in Libxml >= 2.13.0, as of PHP 8.4.0). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
reference/libxml/constants.xml
Outdated
@@ -71,6 +83,7 @@ | |||
<caution> | |||
<simpara> | |||
Enabling validating the DTD may facilitate XML External Entity (XXE) attacks. | |||
The <link linkend="constant.libxml-no-xxe"><constant>LIBXML_NO_XXE</constant></link> constant can be used to prevent this (only available in Libxml >= 2.13.0, as of PHP 8.4.0). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
Generally, it is preferable to use <function>libxml_set_external_entity_loader</function> | ||
to suppress loading of external entities. | ||
The <link linkend="constant.libxml-no-xxe"><constant>LIBXML_NO_XXE</constant></link> constant can be used to prevent this as well (only available in Libxml >= 2.13.0, as of PHP 8.4.0). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
<member><link linkend="libxml.constants">The <constant>LIBXML_NOENT</constant> constant</link></member> | ||
<member><link linkend="libxml.constants">The <constant>LIBXML_DTDVALID</constant> constant</link></member> | ||
<member><link linkend="libxml.constants">The <constant>LIBXML_NO_XXE</constant> constant</link></member> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does link tags are unnecessary now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Based on stale PR GH-1409.
Closes GH-1409.
Closes GH-1408.