#29022: HashedFilesMixin does not properly skip protocol-relative urls
-----------------------------------------------+------------------------
Reporter: Will Gulian | Owner: nobody
Type: Bug | Status: new
Component: contrib.staticfiles | Version: 2.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------------+------------------------
While protocol-relative urls have been deprecated it would be nice for
Django staticfiles to support it since a lot of code still uses it or
explicitly ''not'' support it. Right now the relevant snippet implies that
the code does filter out protocol-relative urls but it currently does not:
{{{#!python
# django/contrib/staticfiles/storage.py
# Ignore absolute/protocol-relative and data-uri URLs.
if re.match(r'^[a-z]+:', url):
return matched
}}}
I've included an example snippet that uses a protocol-relative url but is
not filtered:
{{{#!css
@import
url("//fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Raleway:400,800,900");
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29022>
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/048.45d5faaf70e389235aee8fe905a7388e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.