#23431: Regression in security patch for _to_field param filtering in admin
-------------------------------+--------------------
Reporter: a1tus | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
After installing 1.7 release with this security patch I've found several
issues concerned with raw_id widget and inlines in contrib.admin.
`DisallowedModelAdminToField` exception was raised in both cases and
django admin returned `HTTP code 400: Bad Request`.
--------
1st case
The problem is that with this (whole) security fix all not registered in
admin models can't be referenced. Though they may present in admin as
inlines. I mean if I have models A and B that are registered in admin and
model C which is a relation that is not registered as a separate admin
class, I can't make my inline C_Inline class to work with raw_id_fields.
Consider the following gist:
https://gist.github.com/a1tus/95cd43e8eceffb8ad7fa
--------
2nd case
Another one concerned with ManyToManyField and through model:
https://gist.github.com/a1tus/abe1d9ffa756cf83a968
--------
See also this pull request (with some discussion and patch for this
issue):
https://github.com/django/django/pull/3096
--
Ticket URL: <https://code.djangoproject.com/ticket/23431>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/048.6905bba7c3d77ee68304fa1fa78ea2ab%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.