diff options
| author | Adam Soltys <[email protected]> | 2026-09-10 23:15:15 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-10 23:15:15 -0700 |
| commit | 25c8f34c98f997371616c12f83687561117ea3b5 (patch) | |
| tree | b1882b850b50a5eba1ad04f099b0251b288e7727 /android/app/src/main/java | |
| parent | 7539975beed48ed7aa9c35495d34f5b8b547cc93 (diff) | |
| download | coinosv3-25c8f34c98f997371616c12f83687561117ea3b5.tar.gz coinosv3-25c8f34c98f997371616c12f83687561117ea3b5.zip | |
The thumbnail fetches the bytes instead of trusting a crossOrigin <img>.
Pinguimdarelva's avatar still flashed, and the reason was one I'd have kept
guessing at: from the live browser, `new Image()` with crossOrigin set FAILS
for that picture, while `fetch(url, {mode:'cors', cache:'reload'})` for the
very same URL returns 200. The host allows us perfectly well.
The picture sits behind a 302, and the avatar is painted as an ordinary
background-image — so the bytes are already in the HTTP cache under the
redirect's target as a no-CORS entry, and the crossOrigin <img> reuses that
entry and fails the CORS check. The image loads, the CORS copy "errors", and
the face gets written off.
So the thumbnailer fetches the bytes itself and draws from a blob: no
crossOrigin element, no cache collision, and an untainted canvas without
depending on the element's CORS bookkeeping. With no taint left to detect,
failures no longer split into hard and soft — each one just backs off, from
six hours up to a fortnight, so a host that truly won't have us is asked
twice a month instead of every boot.
The test now serves a picture behind a redirect and loads it plainly before
thumbnailing it, which is the shape that broke; it fails on the old code.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019mrt228Upn9nNCwGixzSLx
Diffstat (limited to 'android/app/src/main/java')
0 files changed, 0 insertions, 0 deletions
