Skip to content

use posixpath.join when loading template names#1621

Merged
davidism merged 1 commit intomainfrom
template-safe-path
Mar 15, 2022
Merged

use posixpath.join when loading template names#1621
davidism merged 1 commit intomainfrom
template-safe-path

Conversation

@davidism
Copy link
Copy Markdown
Member

Similar to an issue with Werkzeug and Flask's send_file and safe_join, FileSystemLoader and PackageLoader should use posixpath.join instead of os.path.join, so that on Windows "drive:" and UNC segments cannot break out of the search directory.

@davidism davidism added this to the 3.1.0 milestone Mar 15, 2022
@davidism davidism force-pushed the template-safe-path branch from c552b63 to 040088a Compare March 15, 2022 20:58
@davidism davidism merged commit ede0f98 into main Mar 15, 2022
@davidism davidism deleted the template-safe-path branch March 15, 2022 21:02
felixxm added a commit to felixxm/django that referenced this pull request Mar 25, 2022
felixxm added a commit to django/django that referenced this pull request Mar 25, 2022
felixxm added a commit to django/django that referenced this pull request Mar 25, 2022
felixxm added a commit to django/django that referenced this pull request Mar 25, 2022
felixxm added a commit to django/django that referenced this pull request Mar 25, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant