#15718: Django unquotes urls and not able to distinguish %2F and /
-------------------------------------+-------------------------------------
Reporter: fed239 | Owner: nobody
Type: Bug | Status: closed
Component: Core (Other) | Version: 1.2
Severity: Normal | Resolution: wontfix
Keywords: urls, url resolver, | Triage Stage:
unquote, %2F | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by gst):
Replying to [comment:6 gst]:
> I've ran into the exact same issue :/
>
> The main problem I see is that, as far as I understand actually, django
compares the url in its url-decoded form against each possible regex
pattern. So the problems we are encountering with '/' encoded url value
(%2F). Though I could be wrong 'cause I've not went to check django code.
The other possible work around, is to url-encode twice the different parts
of the url (so that '/' would be compared as '%2F' when compared to all
the url regex patterns and then no more problem also) that you want to
reach and then to decode them once in the view.
Though it seems rather special.
--
Ticket URL: <https://code.djangoproject.com/ticket/15718#comment:9>
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/064.9e71b98cad63ae752c25132ccb6b3bc9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.