Files
Sable/src/app/utils
7w1 6e0bd7424f fix(media): sniff decrypted image content type and harden encrypted media cache (#1271)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

- Sniff decrypted image MIME type from magic bytes when sender omits
mimetype
- Keep encryption params on SHA-256 mismatch so transient network errors
are retryable
- Use no-store Cache-Control for octet-stream responses to prevent
cached broken render
- Self-heal existing cache entries with sniffed content type
- Release concurrency semaphore earlier after decrypt
- Skip thumbnail requests for animated images (GIF/APNG/AVIF/WebP)
- Fall back to full download when thumbnail fails on retry
- Swallow unhandled rejection on URL preview fetch (SABLE-167)
- Catch Tauri HTTP plugin SyntaxError on HTML error pages (SABLE-16F)

#### Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings

### AI disclosure:

- [ ] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).
- [ ] Fully AI generated (explain what all the generated code does in
moderate detail).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->
2026-07-24 15:31:24 +00:00
..
2026-04-16 22:15:13 -05:00
2026-04-17 00:37:15 -05:00
2026-03-17 23:18:55 -05:00
2026-04-17 14:09:04 -05:00
2026-06-13 17:50:02 -05:00
2026-05-06 17:14:12 -05:00
2026-04-19 16:47:28 +02:00
2026-03-17 23:18:55 -05:00
2026-07-20 14:56:11 -05:00
2026-04-16 22:15:13 -05:00
2026-07-17 15:11:47 -05:00
2026-04-16 22:15:13 -05:00
2026-04-17 00:37:15 -05:00
2026-05-13 14:26:10 -05:00
2026-05-13 14:26:10 -05:00
2026-05-04 18:38:45 -05:00
2026-07-18 14:38:45 -05:00
2026-07-11 18:21:10 -05:00
2026-05-13 19:53:42 -05:00
2026-07-21 18:23:53 -05:00
2026-03-19 22:18:52 -05:00
2026-04-17 16:23:59 -05:00
2026-03-17 23:18:55 -05:00
2026-06-18 03:56:53 +02:00
2026-06-15 14:52:52 -05:00
2026-07-23 16:42:38 -05:00
2026-05-14 12:32:52 -05:00
2026-04-30 00:38:20 -05:00
2026-04-23 18:46:13 +03:00
2026-07-21 15:56:05 -05:00
2026-07-21 15:56:05 -05:00
2026-03-19 21:19:33 -05:00
2026-03-19 21:17:36 -05:00
2026-05-08 16:26:25 -05:00
2026-07-22 14:01:54 -05:00