Fixed #18487 -- Made sure that protocol-relative URLs aren't processed by the cached staticfiles storage. Thanks to LukaszBalcerzak for the patch.

This commit is contained in:
Jannis Leidel 2012-07-08 18:25:12 +02:00
parent 3047981517
commit 1aa0d8ac4d
3 changed files with 20 additions and 1 deletions

View file

@ -161,7 +161,7 @@ class CachedFilesMixin(object):
matched, url = matchobj.groups()
# Completely ignore http(s) prefixed URLs,
# fragments and data-uri URLs
if url.startswith(('#', 'http:', 'https:', 'data:')):
if url.startswith(('#', 'http:', 'https:', 'data:', '//')):
return matched
name_parts = name.split(os.sep)
# Using posix normpath here to remove duplicates