[issue46251] logger.config.configure_formatter executes arbitrary code
MarkBaggett
report at bugs.python.org
Mon Jan 3 17:26:08 EST 2022
MarkBaggett <lo127001 at gmail.com> added the comment:
Here are the relevant parts of calculator.py..
import logging
import logging.config
import json
import pathlib
import os
config_location = pathlib.Path( os.path.realpath(__file__) ).parent / "log.config"
log_config = json.load( config_location.open() )
logging.config.dictConfig(log_config)
logger = logging.getLogger("calculator")
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46251>
_______________________________________
More information about the Python-bugs-list
mailing list