Code

Opened 2 years ago

Closed 2 years ago

#17455 closed Bug (fixed)

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

Reported by: tkaemming Owned by: jezdez
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 2 years ago.
patch to add data: to list of tuple prefixes for url post-processing

Download all attachments as: .zip

Change History (7)

Changed 2 years ago by tkaemming

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

comment:1 Changed 2 years ago by tkaemming

  • Easy pickings set
  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to tkaemming
  • Patch needs improvement unset

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

comment:2 Changed 2 years ago by tkaemming

  • Type changed from Uncategorized to Bug

comment:3 Changed 2 years ago by aaugustin

  • Needs tests set
  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to Accepted

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 2 years ago by aaugustin (previous) (diff)

comment:4 Changed 2 years ago by jezdez

  • Owner changed from tkaemming to jezdez

comment:5 Changed 2 years ago by jezdez

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

comment:6 Changed 2 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

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).

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.