You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6a5b0bb
Browse filesBrowse the repository at this point in the historyBrowse files
Thumbnails: refresh when the source or pin changes, harden the fetch
- needsFetch also compares the record's source with the entry url and the
stored pin and image with preview:; a source that fails three runs in a
row, or whose image is older than twice the refresh age, is dropped
(afterFailure); validate flags a record whose source no longer matches
the entry url (Closes#133)
- Image URLs must be public https hosts: http is upgraded, localhost, IP
literals and credentials are refused, both for og:image and after
redirects, and preview: is checked the same way. The body is streamed
with a byte cap, the first bytes must be PNG, JPEG, GIF or WebP before
the converter runs, and ffmpeg or magick is killed after 30 s. Job
timeouts landed with #136 (Closes#134)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rejects("preview field: http refused",checkPreviewField("bad.md",{preview: "http://a/b.png"}),'bad.md preview must be "none" or an https:// image URL');
796
+
rejects("preview field: loopback refused",checkPreviewField("bad.md",{preview: "https://127.0.0.1/a.png"}),"bad.md preview must be an https:// image URL on a public host");
796
797
rejects("preview field: word refused",checkPreviewField("bad.md",{preview: "yes"}),'bad.md preview must be "none" or an https:// image URL');
797
798
798
799
/* V30: line endings ------------------------------------------------------ */
eq("thumbs: CC0 active itch page is eligible",previewEligibility({license: "CC0",status: "active",url: "https://kaylousberg.itch.io/block-bits"}).ok,true);
903
903
eq("thumbs: custom licence refused",previewEligibility({license: "custom",status: "active",url: "https://x.itch.io/a"}).reason,"licence custom is not in the preview allowlist");
904
904
eq("thumbs: needs-review refused before licence",previewEligibility({license: "custom",status: "needs-review",url: "https://x.itch.io/a"}).reason,"status is needs-review");
0 commit comments