| Age | Commit message (Collapse) | Author |
|
users with custom user models.
Since Django 6.0, the admin obfuscated the password hash only when the
field's model was exactly AUTH_USER_MODEL. Other user models, and user
models inheriting the password field from a concrete parent model,
failed that check, so the full hash was displayed to users with only
the view permission.
Thanks to Aaron chen for the report, and Jake Howard for the review.
|
|
Many (~70) tests assert a specific row order for querysets whose SQL has no
ORDER BY. SQL standard does not define that order.
On PostgreSQL the rows usually arrive in physical storage order, which
on a freshly loaded table matches insertion order -- so these assertions
pass by coincidence rather than by contract. That breaks when rows are
updated or deleted and the space is reused, or when the planner picks a
different access path such as an index scan. A test like this can start
failing with no change to Django or to the test itself.
The patch made sure that most of these tests do not
rely on unspecified unordered selection order.
|
|
rendering admin links.
The admin renders URLField values as clickable links on changelists and
read-only change forms. The link was built without validating the URL,
so a potentially dangerous stored value could be rendered as a link that
runs script in a staff member's authenticated session when clicked.
The admin renders URLField values as clickable links on changelists and
read-only change forms. The link was built without validating the URL,
so a stored value using a potentially dangerous value was rendered as a
link, which could lead to cross-site scripting in an authenticated admin
session.
Refs CVE-2019-12308, #36032.
Thanks to Egor Saltykov for the report, and Sarah Boyce for reviews.
|
|
Co-authored-by: blighj <blighj@users.noreply.github.com>
|
|
ModelAdmin.list_display.
Thanks Rob Kuipers for the report.
Regression in 4b2b4bf0ac2707dc9c4d51cabfa72168eaea95fe.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
|
|
|
containing only whitespace in admin.
|
|
It's how Django formats values internally and makes tests compatible
with databases that use non-integer primary keys.
|
|
feature flags.
Needed on MongoDB.
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
Thanks Simon Charette for pair programming.
Co-authored-by: Nick Stefan <NickStefan12@gmail.com>
Co-authored-by: Akash Kumar Sen <71623442+Akash-Kumar-Sen@users.noreply.github.com>
Co-authored-by: Simon Charette <charette.s@gmail.com>
|
|
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
|
|
sufficient permissions.
This change ensures that the "Reset password" button in the admin is
shown only when the user has the necessary permission to perform a
password change operation. It reuses the password hashing rendering
logic in `display_for_field` to show the appropriate read-only widget
for users with view-only access.
|
|
LogEntry.objects.log_actions().
Thank you Adam Johnson for the report and fix. Thank you Sarah Boyce for
your spot on analysis.
Regression in c09bceef68e5abb79accedd12dade16aa6577a09, which is
partially reverted in this branch.
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
|
|
LogEntry.save() for single-object deletion in the admin.
Regression in 40b3975e7d3e1464a733c69171ad7d38f8814280.
Thanks smiling-watermelon for the report.
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
|
|
LogEntryManager.log_action() per deprecation timeline.
|
|
|
|
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.
|
|
Co-authored-by: Alex Garcia <me@alexoteiza.com>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Co-authored-by: Nina Menezes <https://github.com/nmenezes0>
|
|
empty values.
|
|
|
|
|
|
This also deprecates ModelAdmin.log_deletion() and
LogEntryManager.log_action().
|
|
|
|
filters.
|
|
Added AdminSite.get_log_entries() as an override point and made this
available to the template via each_context().
|
|
Black 23.1.0 is released which, as the first release of the year,
introduces the 2023 stable style. This incorporates most of last year's
preview style.
https://github.com/psf/black/releases/tag/23.1.0
|
|
where appropriate.
Follow up to 3f7b3275627385f8f7531fca01cdda50d4ec6b6e.
|
|
|
|
|
|
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
|
|
Refs #25134, #32099.
|
|
read-only JSONField values in admin.
|
|
|
|
|
|
|
|
|
|
Thanks Claude Paroz for assistance with translations.
|
|
instead of field names.
|
|
|
|
has an extra field.
|
|
|
|
Thanks Lynn Cyrin for contributing to the patch, and Nick Pope for review.
|
|
|
|
|
|
formatted with thousand separators.
|
|
|
|
|
|
|
|
|