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 12a4ffb
Browse filesBrowse the repository at this point in the historyBrowse files
fix(blobs): recover a group-chat avatar whose download URL expired (#1478)
A sender's avatar in a group transcript stays on its BlurHash. The blob's
download_url is a short-lived signed URL, so a persisted profile picture
routinely carries a dead one, and the three seams that are meant to re-mint it
were all broken:
- GetBlobs set the access context after signing, so the signature covered
{blobIds} while the server verified {blobIds, context}. Every re-mint of a
blob the caller doesn't own — which is every other member's avatar — came
back UNAUTHENTICATED. Owned blobs were unaffected, so this only showed up in
group chat, the one surface that passes BlobAccessContext.profile.
- NetworkFetcher writes a response to the disk cache before it throws on the
status code, and ImmutableBlobCacheStrategy served any cached response
without a request. One fetch through an expired URL pinned the blob's key to
403 for good; no re-mint could reach it. A response NetworkFetcher would
throw on is now neither served nor stored, which also un-poisons an entry an
older build wrote.
- BlobId was a value class over ByteArray, so it compared by array identity.
Each read of a persisted MediaItem decodes fresh arrays, making every
emission a different MediaItem; remember(media) in rememberMediaUrl then
dropped its state and cancelled the in-flight re-mint. On device this showed
as GetBlobs being sent and its result never applied.
BlobId carries a serializer that keeps encoding it as bare bytes. MediaItems
persisted while it was a value class hold the id inlined, and the class-shaped
default silently failed to decode them — which drops the whole MediaItem and
leaves the avatar with no image at all.
0 commit comments