#30043: AdminURLFieldWidget incorrectly unquotes URLs e.g. containing %2F
-------------------------------------+-------------------------------------
Reporter: Brenton Partridge | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: admin, urlfield, | Triage Stage: Accepted
smart_urlquote, url, quote |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Florian Apolloner):
Dropping `smart_urlquote` would result in the wrong URL returned for
`/äöü`. The main issue here is that we do not know if the URL supplied is
already sufficiently quoted or not. Hence we try to unquote and quote
again to prevent attacks which contain half quoted URLs. To me unquoting
seems a valid choice to do since most users will properly copy URLs from
browser location bars which would return `/%C3%A4%C3%B6%C3%BC` for the
previous example.
But please try to convince me otherwise, I might miss something important
here (this code is tricky).
--
Ticket URL: <https://code.djangoproject.com/ticket/30043#comment:3>
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/068.cb5f398fca2149b0c326a6553c3c45c2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.