Skip to content

Commit 3dc3baf

Browse files
committed
Re-write warning about xmlparser.ExternalEntityRefHandler
The previous version was apparantly not clear enough.
1 parent fb5234e commit 3dc3baf

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Doc/library/pyexpat.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -616,9 +616,12 @@ otherwise stated.
616616

617617
.. warning::
618618

619-
Registering a handler for external entity references may allow
620-
attacker-controller XML to access local files and/or the network,
621-
and thus create new security risks.
619+
Implementing a handler that accesses local files and/or the network
620+
may create a vulnerabilitiy to
621+
`external entity attacks <https://en.wikipedia.org/wiki/XML_external_entity_attack>`_
622+
if :class:`xmlparser` is used with user-provided XML content.
623+
Please reflect on your `threat model <https://en.wikipedia.org/wiki/Threat_model>_`
624+
before implementing this handler.
622625
By default, :class:`xmlparser` is safe from these threats.
623626

624627
Called for references to external entities. *base* is the current base, as set

0 commit comments

Comments
 (0)