File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,20 @@ in :mod:`logging` itself) and defining handlers which are declared either in
191191 :func: `listen `.
192192
193193
194+ Security considerations
195+ ^^^^^^^^^^^^^^^^^^^^^^^
196+
197+ The logging configuration functionality tries to offer convenience, and in part this
198+ is done by offering the ability to convert text in configuration files into Python
199+ objects used in logging configuration - for example, as described in
200+ :ref: `logging-config-dict-userdef `. However, these same mechanisms (importing
201+ callables from user-defined modules and calling them with parameters from the
202+ configuration) could be used to invoke any code you like, and for this reason you
203+ should treat configuration files from untrusted sources with *extreme caution * and
204+ satisfy yourself that nothing bad can happen if you load them, before actually loading
205+ them.
206+
207+
194208.. _logging-config-dictschema :
195209
196210Configuration dictionary schema
You can’t perform that action at this time.
0 commit comments