diff options
| author | Adam Soltys <[email protected]> | 2026-09-26 22:45:43 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-26 22:45:43 -0700 |
| commit | 0912f443cc738af7dd7093670f00420de72a095f (patch) | |
| tree | 8626fdd5f9e66d6c06765659963ac137d59b0015 /scripts/monitor-ln-socket.sh | |
| parent | 56aef551bf72eb306d96b4b81b657c4a05037eb5 (diff) | |
| download | coinos-server-0912f443cc738af7dd7093670f00420de72a095f.tar.gz coinos-server-0912f443cc738af7dd7093670f00420de72a095f.zip | |
upload: decode images in a throwaway child process and tighten input checks
Malformed HEIF uploads were corrupting the heap inside libvips/libheif and
taking the whole app down with them, since sharp ran in-process. Move the
decode into a per-upload child (lib/image-worker.ts, spawned by lib/image.ts
with a hard timeout) so a decoder crash fails one request instead of the
server, and never load sharp in the main process.
Also: only accept jpeg/png/webp/gif as sniffed by file-type instead of any
image/* subtype, decode with failOnError and a pixel cap, refuse uploads
from blacklisted accounts (a freeze previously only blocked sends), and
rate-limit uploads per account.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'scripts/monitor-ln-socket.sh')
0 files changed, 0 insertions, 0 deletions
