March 3, 2026
Django 5.2.12 fixes a security issue with severity "moderate" and a security issue with severity "low" in 5.2.11. It also fixes one bug related to support for Python 3.14.
URLField via Unicode normalization on Windows¶The URLField form field's to_python() method used
urlsplit() to determine whether to prepend a URL scheme to
the submitted value. On Windows, urlsplit() performs
NFKC normalization, which can be
disproportionately slow for large inputs containing certain characters.
URLField.to_python() now uses a simplified scheme detection, avoiding
Unicode normalization entirely and deferring URL validation to the appropriate
layers. As a result, while leading and trailing whitespace is still stripped by
default, characters such as newlines, tabs, and other control characters within
the value are no longer handled by URLField.to_python(). When using the
default URLValidator, these values will
continue to raise ValidationError during
validation, but if you rely on custom validators, ensure they do not depend on
the previous behavior of URLField.to_python().
This issue has severity "moderate" according to the Django security policy.
Django's file-system storage and file-based cache backends used the process
umask to control permissions when creating directories. In multi-threaded
environments, one thread's temporary umask change can affect other threads'
file and directory creation, resulting in file system objects being created
with unintended permissions.
Django now applies the requested permissions via chmod() after
mkdir(), removing the dependency on the process-wide umask.
根据 Django 安全政策,这个问题的严重性为“低”。
4月 20, 2026
本文整理自 Django 6.0 官方中文文档,转载请注明出处。
上一篇:Django 5.2.12 release notes — Django 6.0.4 documentation(2026)
下一篇:Django 5.2.13 release notes — Django 6.0.4 documentation(2026)