django1/django/core/management
Shai Berger 42cd8c390d Fixed #33986 -- Hardened binary lookup in template commands.
Made template commands look up formatters before writing files.
This makes sure files included in the template are not identified
as executable formatter commands, even in case the template is
rendered into the system path (as might easily happen on Windows,
where the current directory is on the system path by default).

While at it, Warned about trusting custom templates for
startapp/startproject.

Thanks Trung Pham of Viettel Cyber Security for reporting the issue,
Django Security Team for discussions, and Adam Johnson and
Carlton Gibson for reviews.
2022-09-07 11:08:43 +02:00
..
commands Fixed #33949 -- Fixed fixture dirs duplicates with Path instances. 2022-08-23 13:24:18 +02:00
__init__.py Removed obsolete note in management.get_commands() docstring. 2022-07-25 07:55:52 +02:00
base.py Fixed #33657 -- Allowed customizing formatter class of argument parsers. 2022-06-20 17:34:52 +02:00
color.py Fixed #33580 -- Fixed crash when checking support for terminal colors on Wine. 2022-03-16 16:16:10 +01:00
sql.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
templates.py Fixed #33986 -- Hardened binary lookup in template commands. 2022-09-07 11:08:43 +02:00
utils.py Fixed #33986 -- Hardened binary lookup in template commands. 2022-09-07 11:08:43 +02:00