summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
13 daysRefs #34118 -- Removed further asgiref coroutine detection shims in tests.Jacob Walls
Follow-up to 4a52533329a03207c1c4592a13fbb12b9ec5ef9e.
14 daysFixed #37152 -- Raised ValueError when Bcc is used in EmailMessage headers.diaxoaine
Bcc addresses are sent via the SMTP envelope and must never appear in the message itself. A "Bcc" key in `extra_headers` was not excluded like From/To/Cc/Reply-To, so it leaked into the generated message as a visible header. Thanks Mike Edmunds for reviews.
2026-06-16Removed selenium<4.44.0 version pin.Sarah Boyce
2026-06-16Fixed #37169, Refs #36437 -- Replaced text-based selector in a selenium test.SiHyunLee
After incorporating a translation for "Run" in Arabic, the RTL case started failing.
2026-06-15Fixed #31317 -- Avoided crash in CreateModel with unique_together and ↵David Wobrock
AlterUniqueTogether.
2026-06-11Fixed #36969, #35371 -- Reduced false positives in strings during collectstatic.James Bligh
Thanks Johannes Maron for reviews.
2026-06-11Fixed #37141 -- Added --using option to sendtestemail command.NagaKartheekReddy
2026-06-11Fixed #36979 -- Made GenericInlineModelAdmin.get_formset() use get_exclude().Manas225
2026-06-11Fixed #36837 -- Skipped backends not implementing (a)get_user() in ↵Sezer BOZKIR
(a)force_login(). Co-authored-by: Mykhailo Havelia <Arfey17.mg@gmail.com>
2026-06-11Fixed #33185 -- Fixed sqlmigrate crash for RenameModel with a ↵siddus
self-referential foreign key. When collecting SQL (e.g. for sqlmigrate), a RenameModel operation's table rename is not executed, so the subsequent field alteration introspected the renamed table before it existed. On MySQL this raised "Table doesn't exist", and on PostgreSQL the missing introspection silently omitted the self-referential foreign key's drop and recreate. The schema editor now records table renames while collecting SQL and redirects constraint-name introspection to the still-existing old table name, which carries the same constraints. Applying migrations is unaffected.
2026-06-10Fixed #36104 -- Returned NotImplemented in Media.__add__ for non-Media RHS.Jacob Walls
2026-06-10Fixed #29187 -- Fixed flaky receiver count assertion in signals tests.Jacob Walls
Signal.receivers prunes dead weak references lazily, so a weak receiver garbage-collected elsewhere could still occupy a slot when BaseSignalSetup.setUp() counted receivers. The test's own connect/send/disconnect calls would then prune before tearDown() counted again.
2026-06-10Fixed #37142 -- Moved django_file_prefixes() to django.utils.warnings.zhengkangyang
2026-06-09Fixed #37130 -- Skipped DB cache deletion when culling offset is zero.vishwa
2026-06-09Fixed #36900 -- Used safe_join() on downloaded template archive.ar3ph
2026-06-09Refs #36560, CVE-2026-35193 -- Replaced substring check on cache-control ↵Jacob Walls
directives in UpdateCacheMiddleware. Avoid false positives from hypothetical extension directives that could be superstrings of the ones we are checking.
2026-06-09Fixed #37147 -- Fixed rendering empty values for models with db_default on ↵Mariusz Felisiak
primary key.
2026-06-08Refs CVE-2026-48587 -- Added helper to properly split header values.Natalia
Extracted the repeated `split(",")` + per-token `.strip()` pattern into a `split_header_value()` generator in django/utils/http.py. The previous `cc_delim_re` regex only stripped whitespace adjacent to the comma delimiter, leaving leading or trailing whitespace on the first and last tokens. Now, `split_header_value()` strips every token fully, matching RFC 9110's optional-whitespace rules. Thanks to Shai Berger, Jacob Walls, and Sarah Boyce for reviews.
2026-06-08Refs #23929 -- Fixed test setup in CreateDefaultSiteTests.Jacob Walls
2026-06-08Refs #16281 -- Fixed isolation of admin_views.ViewOnSiteTests.Jacob Walls
We were seeing this occasional failure in FlatpagesSitemapTests.setUpClass(), which was unexpectedly attempting a write on the "other" database because of an instance hint from a cached Site: django.test.testcases.DatabaseOperationForbidden: Database queries to 'other' are not allowed in this test. Add 'other' to flatpages_tests.test_sitemaps.FlatpagesSitemapTests.databases to ensure proper test isolation and silence this failure.
2026-06-08Fixed #32785 -- Optimized cull frequency for DBCache.eevelweezel
2026-06-05Fixed #36984 -- Made inline formset error messages respect ↵Karolis Ryselis
delete_confirmation_max_display.
2026-06-05Fixed #37139 -- Fixed inlines crash on parent models with db_default on ↵Mariusz Felisiak
primary key.
2026-06-03Fixed #36492 -- Restored exact boolean lookup against literals on SQLite.Simon Charette
Performance regression in 37e6c5b on SQLite. Just like MySQL, and presumably Oracle, which don't have a native boolean type and incidently store booleans in integer columns, indices on such columns cannot be used when explicit boolean literal equalities are omitted. Adapt the logic introduced by refs #32691 for MySQL to be used for all backends that don't support native boolean fields instead of special casing MySQL, SQLite, and Oracle in their own special way. Note that review of this work surfaced that SQLite's query planner also cannot make use of indices when dealing with expressions of form WHERE NOT (indexed_bool_field = false) but that's a long standing problem unrelated to the restorative work performed in this patch. Thanks Klaas van Schelven for the report.
2026-06-03Refs CVE-2026-6873 -- Defaulted SIGNED_COOKIE_LEGACY_SALT_FALLBACK ↵Jacob Walls
transitional setting to False.
2026-06-03Refs #36499 -- Added coverage for non-UTC TIME_ZONE with Trunc().Jacob Walls
2026-06-03Fixed CVE-2026-48587 -- Ignored whitespace padding when checking Vary header ↵Jake Howard
values. Thanks to Navid Rezazadeh for the report and Jacob Walls for review.
2026-06-03Fixed CVE-2026-35193 -- Varied on Authorization when caching non-public ↵Jacob Walls
responses. Thanks Shai Berger for the report, and Natalia Bidart and Sarah Boyce for reviews.
2026-06-03Fixed CVE-2026-8404 -- Used Cache-Control directives case-insensitively in ↵Jake Howard
UpdateCacheMiddleware. Thanks Ahmed Badawe for the report, and Jacob Walls for reviews.
2026-06-03Fixed CVE-2026-7666 -- Delayed setting SMTP connection until fully configured.Jake Howard
Thanks Kasper Dupont for the report, and Jacob Walls and Natalia Bidart for reviews.
2026-06-03Fixed CVE-2026-6873 -- Prevented signed cookie salt namespace collisions.Paul McMillan
Made signed cookies derive their signer namespace from an injective encoding of `(name, salt)` while preserving compatibility with legacy `name + salt` cookies behind SIGNED_COOKIE_LEGACY_SALT_FALLBACK. Thanks Peng Zhou for the report, and Shai Berger, Markus Holterman, Jake Howard, and Paul McMillan for reviews. Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com> Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2026-06-02Fixed #37103 -- Made HttpRequest.body handle malformed CONTENT_LENGTH.Lier0102
2026-06-01Fixed #28800 -- Added a listurls management command.Chris Rose
Thanks JaeHyuck Sa, Jacob Walls, and Tim McCurrach for reviews. Co-authored-by: Ülgen Sarıkavak <ulgensrkvk@gmail.com>
2026-06-01Refs #28800 -- Handled escaped literals in simplify_regex().Jacob Walls
2026-06-01Refs #28800 -- Lifted some url functions from admindocs into urls.utils.Chris Rose
2026-06-01Fixed #37108 -- Made DjangoJSONEncoder consistently omit .000 microseconds.Aaryan P
2026-05-28Fixed #36225 -- Coped with lack of get_by_natural_key() in createsuperuser.babbitt
2026-05-27Fixed #37019 -- Updated login() and logout() to set request.auser.vishwa
2026-05-27Fixed #36905 -- Deprecated the safe parameter of JSONResponse.Tim Harris
Peer frameworks have long since dropped their analogous checks for this vulnerability that was fixed in ES5.
2026-05-26Bumped versions in pre-commit and npm configurations.Jacob Walls
2026-05-24Removed hardcoded Site pks.Tim Graham
2026-05-24Removed integer pk assumption in AdminCustomQuerysetTest.Tim Graham
2026-05-22Fixed #37117 -- Used ModelAdmin.get_queryset() for change form actions.Natalia
Refs #37105, #12090.
2026-05-22Fixed #37100 -- Prevented control characters in HttpResponse reason_phrase.Varun Kasyap
2026-05-21Fixed #37088 -- Included attributes in media object equality.Johannes Maron
Since in the majority of cases the `MediaAsset.attributes` will be empty or small, there's only a tiny performance penalty. However, the accidental use of the `path` property caused a 1_000x performacne degredation (N=1_000_000).
2026-05-20Increased the default PBKDF2 iterations for Django 6.2.Sarah Boyce
2026-05-20Fixed #37045 -- Renamed savepoint() to savepoint_create().Samuel Searles-Bryant
This makes the name consistent with the `savepoint_commit` and `savepoint_rollback` functions. The previous name is maintained as a deprecated alias. This also frees up the `savepoint` name, which would allow the context manager from `django-subatomic` to be included in Django. Co-authored-by: Lily <code@lilyf.org>
2026-05-20Fixed #36458 -- Trapped focus in the admin calendar and clock widgets.Skyiesac
2026-05-20Refs #36825 -- Fixed regression in CSPSeleniumTestCase.Johannes Maron
The CSP report test relied on the debug view having a CSP error, which has been fixed in 3e4e0db. This commit added a custom view to reintroduce the same error to verify the reporting behavior. Follow-up to 3e4e0db66961a48a080ff3ff91f6c0d954261366.
2026-05-20Refs #12090 -- Aligned admin change form and list minimum permission to run ↵Sarah Boyce
action.