mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
bpo-46251: Add 'Security Considerations' section to logging configura… (GH-30411)
This commit is contained in:
parent
c9137d4b63
commit
46c7a6566b
1 changed files with 14 additions and 0 deletions
|
@ -191,6 +191,20 @@ in :mod:`logging` itself) and defining handlers which are declared either in
|
||||||
:func:`listen`.
|
:func:`listen`.
|
||||||
|
|
||||||
|
|
||||||
|
Security considerations
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The logging configuration functionality tries to offer convenience, and in part this
|
||||||
|
is done by offering the ability to convert text in configuration files into Python
|
||||||
|
objects used in logging configuration - for example, as described in
|
||||||
|
:ref:`logging-config-dict-userdef`. However, these same mechanisms (importing
|
||||||
|
callables from user-defined modules and calling them with parameters from the
|
||||||
|
configuration) could be used to invoke any code you like, and for this reason you
|
||||||
|
should treat configuration files from untrusted sources with *extreme caution* and
|
||||||
|
satisfy yourself that nothing bad can happen if you load them, before actually loading
|
||||||
|
them.
|
||||||
|
|
||||||
|
|
||||||
.. _logging-config-dictschema:
|
.. _logging-config-dictschema:
|
||||||
|
|
||||||
Configuration dictionary schema
|
Configuration dictionary schema
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue