Commit Graph

13900 Commits

Author SHA1 Message Date
Natalia 60073a3e6b Added stub release notes for 5.1.2. 2024-09-03 10:01:46 -03:00
Natalia 8c35a0a903 Fixed CVE-2024-45231 -- Avoided server error on password reset when email sending fails.
On successful submission of a password reset request, an email is sent
to the accounts known to the system. If sending this email fails (due to
email backend misconfiguration, service provider outage, network issues,
etc.), an attacker might exploit this by detecting which password reset
requests succeed and which ones generate a 500 error response.

Thanks to Thibaut Spriet for the report, and to Mariusz Felisiak, Adam
Johnson, and Sarah Boyce for the reviews.
2024-09-03 09:22:32 -03:00
Sarah Boyce 320dd27412 Fixed CVE-2024-45230 -- Mitigated potential DoS in urlize and urlizetrunc template filters.
Thanks MProgrammer (https://hackerone.com/mprogrammer) for the report.
2024-09-03 09:22:32 -03:00
github-user-en ad7f8129f3 Added EMAIL_USE_SSL to the 'Core Settings Topical Index' docs. 2024-09-03 10:16:20 +02:00
Sarah Boyce fd1dd76778 Fixed #35716 -- Fixed VariableDoesNotExist when rendering admin fieldsets.
Regression in 01ed59f753.

Thank you to Fábio Domingues and Marijke Luttekes for the report,
and thank you to Natalia Bidart for the review.
2024-08-30 20:49:27 +02:00
Vaarun Sinha 884ce37479 Fixed #35083 -- Updated method_decorator to handle async methods.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2024-08-30 08:54:49 -03:00
Claude Paroz 2c1f27d0d0 Dropped safeguards against very old versions of gettext.
gettext 0.19 was released in 2014.
2024-08-30 13:39:04 +02:00
Hisham Mahmood 2b2a2c0e26 Fixed #35702 -- Removed connection pooling note for mysql drivers. 2024-08-30 09:08:32 +02:00
Sarah Boyce 7380ac5734 Fixed #35688 -- Restored timezone and role setters to be PostgreSQL DatabaseWrapper methods.
Following the addition of PostgreSQL connection pool support in
Refs #33497, the methods for configuring the database role and timezone
were moved to module-level functions. This change prevented subclasses
of DatabaseWrapper from overriding these methods as needed, for example,
when creating wrappers for other PostgreSQL-based backends.

Thank you Christian Hardenberg for the report and to
Florian Apolloner and Natalia Bidart for the review.

Regression in fad334e1a9.

Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2024-08-28 19:25:07 -03:00
Adam Johnson 26a67943ac
Removed outdated note about lack of subquery support in MySQL. 2024-08-28 15:55:30 -03:00
Jacob Walls 920efe503f
Fixed typos in docs/howto/initial-data.txt. 2024-08-28 15:24:07 -03:00
Simon Charette 57307bbc7d Fixed #35666 -- Documented stacklevel usage and testing, and adjusted test suite accordingly.
Over the years we've had multiple instances of hit and misses when
emitting warnings: either setting the wrong stacklevel or not setting
it at all.

This work adds assertions for the existing warnings that were declaring
the correct stacklevel, but were lacking tests for it.
2024-08-28 11:44:05 -03:00
Simon Charette 39abd56a7f Refs #35405 -- Adjusted deprecation warning stacklevel in FieldCacheMixin.get_cache_name(). 2024-08-28 11:44:05 -03:00
Simon Charette 47f18a7226 Refs #35326 -- Adjusted deprecation warning stacklevel in FileSystemStorage.OS_OPEN_FLAGS. 2024-08-28 11:44:05 -03:00
Simon Charette 52ed2b645e Refs #35060 -- Adjusted deprecation warning stacklevel in Model.save()/asave(). 2024-08-28 11:44:05 -03:00
Mariusz Felisiak 2b9f0b79bc Fixed typo in docs/ref/models/expressions.txt. 2024-08-28 09:08:16 -03:00
Mariusz Felisiak fed11ba461 Fixed typo in docs/ref/models/expressions.txt. 2024-08-28 09:08:16 -03:00
Natalia b941de340d Fixed grammatical error in stub release notes for upcoming security release. 2024-08-27 09:46:12 -03:00
Natalia 67efd42517 Added stub release notes and release date for 5.1.1, 5.0.9, and 4.2.16. 2024-08-27 09:24:15 -03:00
Natalia 47b921391f Removed unnecessary trailing slashes in Sphinx intersphinx_mapping URLs. 2024-08-23 11:15:16 -03:00
David Smith 0304f677ca Updated Sphinx source_suffix setting to use a mapping.
Since Sphinx 1.8 this setting should be a mapping of file extensions to
file types. Before this change, Sphinx 8+ would show the following  when
building docs:

Converting `source_suffix = '.txt'` to `source_suffix = {'.txt': 'restructuredtext'}`
2024-08-23 11:15:16 -03:00
nessita 7adb6dd98d
Sorted alphabetically forms list in docs/topics/auth/default.txt. 2024-08-22 09:14:11 -03:00
nabil-rady 231c0d8593 Fixed #35668 -- Added mapping support to format_html_join. 2024-08-20 08:20:34 +02:00
Clifford Gama ca1318988c Fixed #35671 -- Clarified string-based fields behavior when null=False. 2024-08-20 08:09:39 +02:00
Natalia 0ebed5fa95 Fixed #35678 -- Removed "usable_password" field from BaseUserCreationForm.
Refs #34429: Following the implementation allowing the setting of
unusable passwords via the admin site, the `BaseUserCreationForm` and
`UserCreationForm` were extended to include a new field for choosing
whether password-based authentication for the new user should be enabled
or disabled at creation time.
Given that these forms are designed to be extended when implementing
custom user models, this branch ensures that this new field is moved to
a new, admin-dedicated, user creation form `AdminUserCreationForm`.

Regression in e626716c28.

Thanks Simon Willison for the report, Fabian Braun and Sarah Boyce for
the review.
2024-08-19 12:39:57 -03:00
Mariusz Felisiak 43cdfa8b20 Refs #35537 -- Clarified release notes for email attachments and alternatives changes. 2024-08-14 10:00:03 +02:00
Simon Charette 602fe961e6 Fixed #35665 -- Fixed a crash when passing an empty order_by to Window.
This also caused un-ordered sliced prefetches to crash as they rely on Window.

Regression in e16d0c176e that made OrderByList
piggy-back ExpressionList without porting the empty handling that the latter
provided.

Supporting explicit empty ordering on Window functions and slicing is arguably
a foot-gun design due to how backends will return undeterministic results but
this is a problem that requires a larger discussion.

Refs #35064.

Thanks Andrew Backer for the report and Mariusz for the review.
2024-08-13 11:26:17 +02:00
David Smith 5ae9922666 Fixed typo of --no-startup in django-admin docs. 2024-08-13 11:18:42 +02:00
Mariusz Felisiak 6f0a4c1f3f
Refs #35648 -- Corrected release notes for SafeString.__add__() changes. 2024-08-12 15:56:00 -03:00
Mohammad Salehi ca47884410 Fixed #35623 -- Documented that a field cannot be named 'check'. 2024-08-12 19:58:37 +02:00
Matthias Kestenholz d84200e4eb Fixed #35648 -- Raised NotImplementedError in SafeString.__add__ for non-string RHS.
This change ensures SafeString addition operations handle non-string RHS
properly, allowing them to implement __radd__ for better compatibility.
2024-08-12 14:25:05 -03:00
Devin Cox e03083917d Fixed #35586 -- Added support for set-returning database functions.
Aggregation optimization didn't account for not referenced set-returning annotations on Postgres.

Co-authored-by: Simon Charette <charette.s@gmail.com>
2024-08-12 15:35:19 +02:00
Mark Gensler 228128618b Fixed #35575 -- Added support for constraint validation on GeneratedFields. 2024-08-12 13:45:57 +02:00
Mariusz Felisiak f883bef054 Refs #35591 -- Removed hardcoded "stable" version in runserver warning. 2024-08-12 10:57:02 +02:00
Andrew Miller 69aa13ffb9 Fixed #35591 -- Added unsuitable for production console warning to runserver. 2024-08-09 10:34:10 +02:00
Adam Johnson 9582745257 Fixed #35622 -- Made unittest ignore Django assertions in traceback frames.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2024-08-08 21:34:01 -03:00
Jure Cuhalev f8ef4579ea Doc'd that SessionMiddleware is required for the admin site.
The system check "admin.E410" was already checking for this, but the
requirement was not listed in docs/ref/contrib/admin/index.txt.
2024-08-08 08:48:41 -03:00
Andrew Miller cec62fb99e Refs #35591 -- Emphasized that runserver is not suitable for production. 2024-08-08 10:08:53 +02:00
Adam Johnson 49815f70e4 Refs #31405 -- Improved LoginRequiredMiddleware documentation.
co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2024-08-08 10:05:31 +02:00
Natalia 790f0f8868 Added stub release notes for 5.1.1. 2024-08-07 10:38:36 -03:00
Natalia 8ad6dc636b Finalized release notes for Django 5.1. 2024-08-07 10:04:18 -03:00
Sarah Boyce fdc638bf4a Added CVE-2024-41989, CVE-2024-41990, CVE-2024-41991, and CVE-2024-42005 to security archive. 2024-08-06 17:22:46 +02:00
Simon Charette c87bfaacf8 Fixed CVE-2024-42005 -- Mitigated QuerySet.values() SQL injection attacks against JSON fields.
Thanks Eyal (eyalgabay) for the report.
2024-08-06 08:50:08 +02:00
Mariusz Felisiak 5f1757142f Fixed CVE-2024-41991 -- Prevented potential ReDoS in django.utils.html.urlize() and AdminURLFieldWidget.
Thanks Seokchan Yoon for the report.

Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2024-08-06 08:50:08 +02:00
Sarah Boyce ecf1f8fb90 Fixed CVE-2024-41990 -- Mitigated potential DoS in urlize and urlizetrunc template filters.
Thanks to MProgrammer for the report.
2024-08-06 08:50:08 +02:00
Sarah Boyce c19465ad87 Fixed CVE-2024-41989 -- Prevented excessive memory consumption in floatformat.
Thanks Elias Myllymäki for the report.

Co-authored-by: Shai Berger <shai@platonix.com>
2024-08-06 08:50:08 +02:00
Sarah Boyce 8deb6bb1fc
Fixed #35657 -- Made FileField handle db_default values. 2024-08-05 16:36:49 -03:00
David Sanders 509763c799 Fixed #35638 -- Updated validate_constraints to consider db_default. 2024-08-05 17:33:12 +02:00
Mariusz Felisiak 304d256674
Used :pypi: role in docs where appropriate. 2024-08-05 10:35:50 -03:00
John Parton 7f8d839722 Fixed #35628 -- Allowed compatible GeneratedFields for ModelAdmin.date_hierarchy. 2024-08-05 15:27:20 +02:00