Django 5.1.7发布说明

March 6, 2025

Django 5.1.7修复了严重程度为“中等”的安全问题和5.1.6中的几个错误。

UTE-2025-26699:中的潜在拒绝服务漏洞 django.utils.text.wrap()

wrap()wordwrap 当与非常长的字符串一起使用时,模板过滤器可能会受到潜在的拒绝服务攻击。

错误修正

  • 修复了Django 5.1中的一个错误,其中 {% querystring %} 模板标签返回空字符串而不是 "?" 当所有参数都已从查询字符串中删除时 (#36182 ).

  • 修复了Django 5.1中的一个错误 FileSystemStorageallow_overwrite 设置为 True ,没有截断覆盖的文件内容 (#36191 ).

  • Fixed a regression in Django 5.1 where the count and exists methods of ManyToManyField related managers would always return 0 and False when the intermediary model back references used to_field (#36197).

  • 修复了Django 5.1中的一个回归问题, pre_savepost_save 信号 LogEntry 在管理中删除单个对象时未发送 (#36217 ).