xarmian
3bd6244001
fix(server): force-download unknown and disallowed stored MIME (BUG-2413)
...
The attachment read path chose Content-Disposition from the stored MIME and
DEFAULTED unknown types to inline, flipping to attachment only for the
RenderForceDownload bucket. A legacy or mislabelled image/svg+xml, an
extensionless SVG stored as text/xml, or an unrecognized row was therefore
served inline from the app's own origin — active same-origin content, one click
away once 3c-ii's converged surface gives every row a Copy-link.
Fail closed. Content-Disposition now defaults to attachment; a row is served
inline only when its stored MIME is on the allowlist AND in an EXPLICIT
inline-safe set (MIMEEntry.ServeInline) — the passive raster/audio/video types
the app embeds, plus PDF and plain text. The set is a standalone allowlist, not
a function of RenderMode, so a future RenderInline entry can't silently
auto-inline an active type; a new type fails safe (downloads) until explicitly
listed. A MIME that isn't on the allowlist at all is additionally served as
application/octet-stream so its bytes are never echoed back as a type the
browser might act on. X-Content-Type-Options: nosniff was already set.
The gate is at the single choke point: GET, HEAD, share-link access, and the
?variant= path all flow through handleGetAttachment (the transform endpoint only
decodes images into a new raster thumbnail; the bundle/account exports never
serve individual bytes inline). Regression tests cover an SVG-labelled row, a
text/xml row, an unknown-MIME row (attachment + octet-stream), and the variant
path forced to attachment, plus PDF and plain text staying inline — GET and
HEAD. Mutation-verified: reverting to the old fail-open default fails exactly the
SVG/text-xml/unknown/variant tests. Reviewed to a fresh-angle CLEAN.
Claude-Session: https://claude.ai/code/session_01WFBYxdBuSZs2tjipATxAZu
2026-08-08 20:37:39 +00:00
..
2026-04-29 15:41:12 -04:00
2026-06-22 11:43:52 -04:00
2026-08-02 05:22:30 +00:00
2026-07-30 20:15:00 +00:00
2026-07-31 02:35:53 +00:00
2026-05-06 08:40:11 -04:00
2026-05-06 13:27:12 -04:00
2026-06-15 14:44:58 -04:00
2026-05-18 00:43:46 -04:00
2026-05-18 00:43:46 -04:00
2026-04-28 12:26:39 -04:00
2026-07-14 20:37:03 -04:00
2026-04-25 11:35:19 -04:00
2026-04-25 11:35:19 -04:00
2026-07-10 23:56:59 -04:00
2026-07-10 23:56:59 -04:00
2026-07-05 20:47:30 -04:00
2026-07-04 14:38:01 -04:00
2026-07-05 20:47:30 -04:00
2026-07-05 19:58:07 -04:00
2026-07-08 16:26:41 -04:00
2026-07-15 01:30:12 -04:00
2026-04-28 12:26:39 -04:00
2026-04-28 12:26:39 -04:00
2026-04-28 16:21:43 -04:00
2026-07-01 17:44:43 -04:00
2026-07-04 04:15:09 -04:00
2026-07-04 04:15:09 -04:00
2026-07-01 17:44:43 -04:00
2026-04-28 12:26:39 -04:00
2026-06-27 21:42:52 -05:00
2026-06-22 13:31:45 -04:00
2026-06-22 13:31:45 -04:00
2026-08-02 00:55:20 +00:00
2026-08-08 20:37:39 +00:00
2026-04-29 15:41:12 -04:00
2026-08-01 19:53:12 +00:00
2026-08-01 23:27:34 +00:00
2026-08-01 20:42:28 +00:00
2026-08-02 00:55:20 +00:00
2026-08-01 23:05:26 +00:00
2026-04-29 15:02:07 -04:00
2026-08-02 00:55:20 +00:00
2026-08-02 00:55:20 +00:00
2026-08-08 20:37:39 +00:00
2026-07-14 20:37:03 -04:00
2026-05-06 13:27:12 -04:00
2026-05-06 08:40:11 -04:00
2026-06-22 20:58:50 -04:00
2026-04-21 19:33:47 -04:00
2026-04-21 20:52:03 -04:00
2026-04-22 12:21:34 -04:00
2026-07-05 18:44:26 -04:00
2026-07-05 18:44:26 -04:00
2026-05-27 10:37:30 -04:00
2026-06-27 21:42:52 -05:00
2026-07-08 13:09:26 -04:00
2026-07-08 13:09:26 -04:00
2026-04-29 14:35:49 -04:00
2026-04-25 11:53:31 -04:00
2026-05-18 15:25:27 -04:00
2026-07-05 12:05:24 -04:00
2026-04-22 09:27:45 -04:00
2026-06-20 23:51:43 -04:00
2026-07-04 11:33:18 -04:00
2026-07-04 11:33:18 -04:00
2026-07-15 01:30:12 -04:00
2026-07-21 20:51:19 -04:00
2026-07-03 18:12:35 -04:00
2026-07-21 09:43:05 -04:00
2026-07-03 03:27:04 -04:00
2026-07-21 09:43:05 -04:00
2026-07-03 18:24:36 -04:00
2026-05-30 12:38:57 -04:00
2026-07-03 18:24:36 -04:00
2026-05-18 08:33:39 -04:00
2026-05-18 03:32:42 -04:00
2026-05-18 08:33:39 -04:00
2026-05-21 13:08:02 -04:00
2026-07-11 09:38:14 -04:00
2026-07-08 12:02:12 -04:00
2026-05-14 22:10:12 -04:00
2026-05-20 16:39:23 -04:00
2026-07-21 09:43:05 -04:00
2026-07-14 23:43:19 -04:00
2026-04-28 12:26:39 -04:00
2026-05-18 18:29:28 -04:00
2026-07-21 09:43:05 -04:00
2026-04-29 18:30:43 -04:00
2026-07-04 13:54:08 -04:00
2026-07-04 13:54:08 -04:00
2026-07-21 09:43:05 -04:00
2026-07-03 20:18:29 -04:00
2026-07-03 14:40:54 -04:00
2026-06-08 18:13:10 -04:00
2026-04-29 22:03:27 -04:00
2026-04-29 20:24:25 -04:00
2026-05-15 00:36:41 -04:00
2026-05-15 00:36:41 -04:00
2026-07-03 23:47:06 -04:00
2026-04-28 12:26:39 -04:00
2026-07-13 22:46:55 -04:00
2026-07-21 18:00:49 -04:00
2026-07-21 18:00:49 -04:00
2026-07-03 15:31:17 -04:00
2026-07-03 15:31:17 -04:00
2026-07-21 15:21:57 -04:00
2026-08-02 04:54:31 +00:00
2026-07-31 14:43:40 +00:00
2026-07-31 04:26:55 +00:00
2026-08-02 04:54:31 +00:00
2026-08-02 04:54:31 +00:00
2026-07-31 17:28:05 +00:00
2026-08-02 04:54:31 +00:00
2026-07-08 16:47:34 -04:00
2026-05-16 10:15:59 -04:00
2026-07-30 20:15:00 +00:00
2026-05-30 19:57:45 -04:00
2026-05-27 13:21:57 -04:00
2026-07-21 09:43:05 -04:00
2026-07-13 22:46:55 -04:00
2026-07-30 20:15:00 +00:00
2026-05-21 16:59:57 -04:00
2026-05-21 16:59:57 -04:00
2026-05-02 22:56:10 -04:00
2026-05-02 22:56:10 -04:00
2026-07-11 09:38:14 -04:00
2026-06-24 22:45:32 -04:00
2026-06-24 22:45:32 -04:00
2026-05-05 08:52:05 -04:00
2026-05-05 08:52:05 -04:00
2026-07-04 14:39:33 -04:00
2026-07-04 14:39:33 -04:00
2026-05-18 00:43:46 -04:00
2026-05-18 00:43:46 -04:00
2026-05-02 13:33:53 -04:00
2026-07-04 11:33:18 -04:00
2026-07-11 14:05:50 -04:00
2026-07-11 14:05:50 -04:00
2026-05-21 13:08:02 -04:00
2026-07-08 15:28:21 -04:00
2026-07-08 15:28:21 -04:00
2026-07-03 22:29:40 -04:00
2026-07-03 22:29:40 -04:00
2026-04-28 12:26:39 -04:00
2026-07-03 15:31:17 -04:00
2026-07-30 12:20:38 +00:00
2026-05-29 08:24:05 -04:00
2026-05-29 17:47:25 -04:00
2026-04-28 12:26:39 -04:00
2026-07-14 20:37:03 -04:00
2026-07-10 23:48:59 -04:00
2026-07-13 22:46:55 -04:00
2026-07-30 12:20:38 +00:00
2026-05-02 21:31:48 -04:00
2026-06-27 21:42:52 -05:00
2026-08-02 01:50:34 +00:00
2026-04-29 17:44:12 -04:00
2026-08-02 01:50:34 +00:00
2026-05-29 23:43:02 -04:00
2026-06-01 21:25:42 -04:00
2026-06-27 21:42:52 -05:00
2026-07-14 23:24:55 -04:00
2026-07-13 22:46:55 -04:00
2026-04-21 22:53:27 -04:00
2026-04-28 12:26:39 -04:00
2026-07-04 03:32:48 -04:00
2026-04-28 12:26:39 -04:00
2026-05-16 10:15:59 -04:00
2026-07-13 22:46:55 -04:00
2026-07-13 22:46:55 -04:00
2026-07-14 23:24:55 -04:00
2026-07-26 23:56:34 +00:00
2026-07-14 23:24:55 -04:00
2026-06-24 22:28:34 -04:00
2026-05-02 18:36:55 -04:00
2026-05-25 11:46:41 -04:00
2026-07-06 10:07:34 -04:00
2026-07-14 20:37:03 -04:00
2026-07-07 16:51:48 -04:00
2026-07-30 12:20:38 +00:00
2026-07-30 12:20:38 +00:00
2026-07-03 10:15:49 -04:00
2026-07-03 12:17:03 -04:00
2026-05-27 10:09:30 -04:00
2026-05-07 20:01:34 -04:00
2026-07-15 01:30:12 -04:00
2026-07-04 11:33:18 -04:00
2026-07-04 11:33:18 -04:00
2026-05-06 08:40:11 -04:00
2026-05-06 08:40:11 -04:00
2026-05-14 15:45:51 -04:00
2026-05-03 17:40:18 -04:00
2026-05-18 00:03:20 -04:00
2026-05-18 00:03:20 -04:00
2026-05-03 17:40:18 -04:00
2026-05-03 17:40:18 -04:00
2026-05-03 17:40:18 -04:00
2026-04-28 12:26:39 -04:00
2026-04-28 12:26:39 -04:00
2026-07-11 14:30:32 -04:00
2026-07-10 23:48:59 -04:00
2026-04-25 11:35:19 -04:00
2026-04-21 19:33:47 -04:00
2026-04-25 11:35:19 -04:00
2026-04-21 23:59:54 -04:00
2026-04-28 12:26:39 -04:00
2026-07-10 23:32:22 -04:00
2026-07-04 02:06:58 -04:00
2026-07-04 02:06:58 -04:00
2026-05-09 18:19:33 -04:00
2026-07-08 11:58:41 -04:00
2026-05-30 10:57:31 -04:00
2026-07-08 11:58:41 -04:00
2026-04-22 12:21:34 -04:00
2026-04-22 12:21:34 -04:00
2026-07-08 11:49:01 -04:00
2026-07-31 00:59:25 +00:00
2026-05-09 07:13:10 -04:00
2026-04-29 14:35:49 -04:00
2026-04-29 14:35:49 -04:00
2026-07-08 11:58:41 -04:00
2026-07-08 11:58:41 -04:00
2026-05-02 13:33:53 -04:00
2026-07-14 20:37:03 -04:00
2026-07-14 20:37:03 -04:00
2026-04-08 20:30:39 +00:00
2026-04-10 23:12:59 +00:00
2026-07-05 22:23:12 -04:00
2026-07-08 11:58:41 -04:00