mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-10 01:09:43 +02:00
fix(preview): #502 landing fixes
Skip zero-size spreadsheet cells in renderTile. On sheets past the 8,000,000 px scroll cap, a cell clipped to nothing at the spacer's edge (or a visible row or column the worker clamped to 0 px) was still created, and the cell padding and border drew it as a 5 px box below the spacer that grew the scroll area. The size is now computed before the element is created and such cells are skipped, the same way the heading loops already skip 0 px rows and columns. spreadsheet-preview.js is not an input of SPREADSHEET_ASSET_VERSION, so the asset token stays valid. Add zh-CN entries for the static spreadsheet preview strings (loading, too large, no visible worksheets, empty worksheet, the warnings label, timeout, failure, the four parser start and message failures, and the unavailable message from panels-ui). The file-preview body is not a skipped surface, so the exact-match entries apply with no code change. The worker's admission refusal messages and the dynamic status message stay English for a follow-up. docs/security-architecture.md described the attachment gate as a 6-extension allowlist; it now names SUPPORTED_ATTACHMENT_EXTENSIONS in src/attachment-registry.ts and what it covers, including the xlsx this PR adds. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -354,8 +354,9 @@ is by id (`GET /api/sessions/:id/attachments/:attachmentId/raw`, same download c
|
||||
the `/root` and `/etc` trees, extendable via `attachmentBlockedPaths` /
|
||||
`CODEMAN_ATTACHMENT_BLOCKED_PATHS`) on every request. Unlike the workspace file
|
||||
routes, attachments are intentionally **cross‑workspace** — so the effective gate
|
||||
is the blocklist + a 6‑extension allowlist (`png/pdf/docx/pptx/md/txt`), not
|
||||
realpath containment.
|
||||
is the blocklist + an extension allowlist (`SUPPORTED_ATTACHMENT_EXTENSIONS` in
|
||||
`src/attachment-registry.ts`: images, pdf/docx/pptx/xlsx, audio/video, md/txt and
|
||||
other text), not realpath containment.
|
||||
|
||||
Two registration paths, with **different trust**:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user