mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-01 22:42:45 +02:00
Always use content to resolve content type in resources.GetRemote
This is a security hardening measure; don't trust the URL extension or any `Content-Type`/`Content-Disposition` header on its own, always look at the file content using Go's `http.DetectContentType`. This commit also adds ttf and otf media type definitions to Hugo. Fixes #9302 Fixes #9301
This commit is contained in:
24
media/testdata/resource.ics
vendored
Normal file
24
media/testdata/resource.ics
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
PRODID:-//ZContent.net//Zap Calendar 1.0//EN
|
||||
CALSCALE:GREGORIAN
|
||||
METHOD:PUBLISH
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Abraham Lincoln
|
||||
UID:c7614cff-3549-4a00-9152-d25cc1fe077d
|
||||
SEQUENCE:0
|
||||
STATUS:CONFIRMED
|
||||
TRANSP:TRANSPARENT
|
||||
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=2;BYMONTHDAY=12
|
||||
DTSTART:20080212
|
||||
DTEND:20080213
|
||||
DTSTAMP:20150421T141403
|
||||
CATEGORIES:U.S. Presidents,Civil War People
|
||||
LOCATION:Hodgenville\, Kentucky
|
||||
GEO:37.5739497;-85.7399606
|
||||
DESCRIPTION:Born February 12\, 1809\nSixteenth President (1861-1865)\n\n\n
|
||||
\nhttp://AmericanHistoryCalendar.com
|
||||
URL:http://americanhistorycalendar.com/peoplecalendar/1,328-abraham-lincol
|
||||
n
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
Reference in New Issue
Block a user