#36996: Apps registry public API methods lack input validation
-------------------------------------+-------------------------------------
Reporter: Nicholas Salzman | Owner: (none)
Type: | Status: closed
Cleanup/optimization |
Component: Core (Other) | Version: 6.0
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):
* resolution: => invalid
* status: new => closed
Comment:
The Django public API has hundreds of methods that can crash if you
provide it the inadequate type, we can't gate them all with `isinstance`
check.
Unless you can provide a real world example where this is an issue (e.g. a
documented use case that isn't explicit about a proper app label needing
to be provided) I don't see the value of peppering this particular API
with instance type checks as there are projects that provide typing stubs
for Django already and [https://github.com/typeddjango/django-
stubs/blob/87a23420767475ca3021f4f1a25887d3477d3dbb/django-
stubs/apps/registry.pyi they have pretty good coverage for this API].
--
Ticket URL: <https://code.djangoproject.com/ticket/36996#comment:1>
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 view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019d0d2eba7d-b102c4af-5fc0-442a-ba1c-ba4ca212b71c-000000%40eu-central-1.amazonses.com.