summaryrefslogtreecommitdiff
path: root/django/db/models/sql/compiler.py
diff options
context:
space:
mode:
authorShai Berger <shai@platonix.com>2022-08-24 12:38:22 +0300
committerCarlton Gibson <carlton@noumenal.es>2022-09-07 11:08:43 +0200
commit42cd8c390d5f165fd7f6bbdffafd2aa4c2d9a32a (patch)
tree4b8f4bf910507889f542c022f9342880c89840d5 /django/db/models/sql/compiler.py
parent19e838daa8872ee29fbea0bc471c2a6443f26835 (diff)
downloaddjango-42cd8c390d5f165fd7f6bbdffafd2aa4c2d9a32a.tar.gz
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.
Diffstat (limited to 'django/db/models/sql/compiler.py')
0 files changed, 0 insertions, 0 deletions