mirror of
https://github.com/django/django.git
synced 2025-10-21 15:52:54 +00:00
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:
parent
3047981517
commit
1aa0d8ac4d
3 changed files with 20 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue