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 @@ -186,6 +186,20 @@ in :mod:`logging` itself) and defining handlers which are declared either in
186186 :func: `listen `.
187187
188188
189+ Security considerations
190+ ^^^^^^^^^^^^^^^^^^^^^^^
191+
192+ The logging configuration functionality tries to offer convenience, and in part this
193+ is done by offering the ability to convert text in configuration files into Python
194+ objects used in logging configuration - for example, as described in
195+ :ref: `logging-config-dict-userdef `. However, these same mechanisms (importing
196+ callables from user-defined modules and calling them with parameters from the
197+ configuration) could be used to invoke any code you like, and for this reason you
198+ should treat configuration files from untrusted sources with *extreme caution * and
199+ satisfy yourself that nothing bad can happen if you load them, before actually loading
200+ them.
201+
202+
189203.. _logging-config-dictschema :
190204
191205Configuration dictionary schema
You can’t perform that action at this time.
0 commit comments