#15900: reverse() does not properly escape namespaced views ------------------------------------+------------------------------ Reporter: teolicy | Owner: nobody Type: Bug | Status: new Milestone: | Component: Core (Other) Version: 1.3 | Severity: Normal Resolution: | Keywords: Triage Stage: Accepted | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 ------------------------------------+------------------------------
Comment (by dmclain): I've uploaded a patch that changes the behavior of reverse and RegexURLResolver.reverse so that namespaced urls are properly normalized. The issue was that when reverse traversed the URLResolver tree, it would build up a prefix consisting of all the regex's, but it would just concatenate them rather than normalizing them. Since most people don't have regex special characters in the prefix to namespaced urls, it wasn't a problem. I also tried to make it so that if a brave soul tries to capture a view function argument, it will work. The patch also changes a couple of the unit tests to use regex's that ought to be the same as they were before after being normalized with django.utils.regex_helper.normalize. -- Ticket URL: <http://code.djangoproject.com/ticket/15900#comment:3> Django <http://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 post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.