#25593: Remove scheme validation from URLValidator or provide all IANA
acceptable
schemes as defaults
----------------------------------------------+--------------------
Reporter: marcinn | Owner: nobody
Type: Uncategorized | Status: new
Component: Database layer (models, ORM) | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+--------------------
== The problem ==
There are defined only four schemes as default: http,https,ftp,ftps.
But URL can have many many more valid schemes.
HTTP and FTP as good defaults are invalid - they are too limited.
There is no simple way to extend these schemes nor disable scheme
validation.
We must extend URLField and redeclare `default_validators` class property,
which is too complex for that simple case.
== Possible solutions ==
- disable scheme validation and enable it only when user defines
`allowed_schemes` directly in URLField (backward incompatible)
- provide `allowed_schemes` as an optional argument for URLField
`init()`
- provide all valid schemes as default set (based on
https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml)
== Preffered solution ==
Probide all (IANA) valid schemes as default together with possibility to
change them by URLField `init()`.
--
Ticket URL: <https://code.djangoproject.com/ticket/25593>
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/050.23315cb842da3a16478a817945ccda6f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.