profile.json and updateProfile.json accept only image/png and image/jpeg. The console's picker also offers webp, gif and avif, uploadImage keeps any Content-Type (even application/pdf), and updateProfile takes whatever mimeType the caller writes into the blob without comparing it with the stored blob. A webp chosen in the console therefore writes a profile record that its own lexicon rejects. A PDF can become the avatar, which /img then answers with 404, so the avatar shows broken.
How to see it
Read against docs/fresh at 4636e6d, the code at: group_config.rs:257-275 (upload_image), :160-165 (blob), :241-250; blobs.rs:150 (IMAGES); lexicons profile.json:28-40, updateProfile.json avatar/banner accept; web/src/lib/organisms/ProfilePictures.svelte:20. Paths are under crates/group-host/src unless they say otherwise. Severity: low.
What you expected
Widen the lexicons' accept to the five types in IMAGES. Refuse any other type in uploadImage, and in updateProfile take mimeType and size from the stored blob rather than from the caller.
Where
The host, as built from 4636e6d. Found while checking the docs against the code.
What happened
profile.json and updateProfile.json accept only
image/pngandimage/jpeg. The console's picker also offers webp, gif and avif,uploadImagekeeps any Content-Type (evenapplication/pdf), andupdateProfiletakes whatevermimeTypethe caller writes into the blob without comparing it with the stored blob. A webp chosen in the console therefore writes a profile record that its own lexicon rejects. A PDF can become the avatar, which/imgthen answers with 404, so the avatar shows broken.How to see it
Read against
docs/freshat 4636e6d, the code at: group_config.rs:257-275 (upload_image), :160-165 (blob), :241-250; blobs.rs:150 (IMAGES); lexicons profile.json:28-40, updateProfile.json avatar/banneraccept; web/src/lib/organisms/ProfilePictures.svelte:20. Paths are undercrates/group-host/srcunless they say otherwise. Severity: low.What you expected
Widen the lexicons'
acceptto the five types inIMAGES. Refuse any other type inuploadImage, and inupdateProfiletakemimeTypeandsizefrom the stored blob rather than from the caller.Where
The host, as built from 4636e6d. Found while checking the docs against the code.