Opened 5 years ago

Closed 5 years ago

#17455 closed Bug (fixed)

CachedFilesMixin fails when postprocessing files with url('data:*')

Reported by: tkaemming Owned by: Jannis Leidel
Component: contrib.staticfiles Version: 1.4-alpha-1
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: yes
Easy pickings: yes UI/UX: no

Description


Attachments (1)

ticket-17455.diff (720 bytes) - added by tkaemming 5 years ago.
patch to add data: to list of tuple prefixes for url post-processing

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by tkaemming

Attachment: ticket-17455.diff added

patch to add data: to list of tuple prefixes for url post-processing

comment:1 Changed 5 years ago by tkaemming

Easy pickings: set
Has patch: set
Owner: changed from nobody to tkaemming

added patch, if tests are needed let me know and i'll gladly provide them

comment:2 Changed 5 years ago by tkaemming

Type: UncategorizedBug

comment:3 Changed 5 years ago by Aymeric Augustin

Needs tests: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted

While we're there, I think the right prefixes to ignore are ('http://', 'https://', '//', 'data:') — that would avoid False positives on URLs such as http_ftw/css/mysite.css, and also support protocol-relative URLs.

Last edited 5 years ago by Aymeric Augustin (previous) (diff)

comment:4 Changed 5 years ago by Jannis Leidel

Owner: changed from tkaemming to Jannis Leidel

comment:5 Changed 5 years ago by Jannis Leidel

Taking ownership of this since there is a downstream bug report, too -- https://github.com/jezdez/django-staticfiles/pull/18

comment:6 Changed 5 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

In [17282]:

Fixed #17455 -- Extended CachedStaticFilesStorage slightly to handle some URLs better that are used to add support for webfonts to IE 6-8. Also ignore data: URLs and fragment-only URLs (e.g. #default#VML).

Note: See TracTickets for help on using tickets.
Back to Top