Repository navigation
Closed
Description
Assessment
Severity: Low / Info each, grouped to keep the tracker tidy. Confidence: Confirmed by code trace unless noted.
Source evidence
- Export file names keep characters Windows forbids —
crates/engine/src/export.rs:1206replaces only/ \ : \0; a{title}likeWhat?,"Best", control characters orCON/NULfails with ERROR_INVALID_NAME. Reuserename::sanitize(rename.rs:54) plus a reserved-name suffix. (No traversal.) FsStorefixed staging name —crates/catalog/src/store.rs:100, 116use{name}.tmp; when locking is unsupported (SMB/NFS, library opens with a warning) two writers share it and can publish a torn snapshot. Use.{name}.{pid}.{n}.tmpwithcreate_new, likesafe_file::create_temp.- Damaged-log copy can be overwritten —
crates/catalog/src/journal.rs:427names itcatalog.log.damaged-<seq>and writes withwrite_atomic; a second damage at the same seq replaces the only copy. Add a counter or usewrite_new_unique. - Bearer token origin ignores the port —
crates/fetch/src/lib.rs:279-281compares onlyurl.host; a redirect tohttps://samehost:8443/still receives the token. Compare(host, port). - SAM tokenizer files unpinned, mirrors may be http —
crates/segment/src/fetch/mod.rs:20-21(sha256: None, TODO); mirrors fromLIGHTCRAFT_SAM3_MIRRORS/ the mirrors file may behttp://. Pin them or refuse non-https mirrors for unpinned files. - Thumbnail cache decode has no limits or panic guard —
crates/preview/src/disk.rs:432calls zune-jpeg directly (default ~16 k² max, nocatch_unwind, unlikelightcraft_codecs::decode); planted.lcthumbfiles can each cost ~800 MB. Set max 4096 and wrap. (Needs verification.) - Lightroom import fails without hard links —
crates/engine/src/lightroom_archive.rs:428publish_newis hard-link only; libraries on exFAT/FAT/some SMB can't import a.lrcat. Fall back tosafe_file::publish_new_by_rename. (Needs verification.) - JPEG APP segments over 64 KB fail the export —
crates/codecs/src/encode.rs:91(exif.len() > 65_527 => Err) andxmp_segment(> 65_533 => Err("extended XMP not supported")): a long caption/keyword list or a large maker note fails every JPEG export of that photo. Write extended XMP or drop the block with a warning. - Latent arithmetic in
raster—crates/raster/src/lib.rs:59-66Image::new/filleduse uncheckedwidth * height;get_clampedwith a 0 dimension callsclamp(0, -1), which panics. No input path found today;checked_mul/ early return. - GPU nn planner —
crates/gpu/src/nn.rs:247(tile << (-level)),:359,:422unchecked shift/multiply; unreachable today because the CPUNetRunnervalidates the model first. - FixBadPixelsList —
crates/raw/src/opcodes.rs:608-617iterates the rows of rectangles whose column range is empty; the count is bounded only by parameter bytes. Skip empty rectangles and cap the count. - Opcode invariants rely on
parse_one—apply_list/warp_rectilineardon - 1,planes.len() - 1;OpcodederivesDeserialize, so deserialising lists from an untrusted source would make these panics. Usechecked_subor validate after deserialisation. - Journal and NaN — serde_json writes NaN/inf as
null; such a record would pass its CRC but fail to parse, and the library is refused with a misleading "newer version" message. No source of NaN was found; a parse-back check inencode_recordwould make it impossible. - Windows test failures at
f34c7a8a(cargo test --workspace --all-featureson Windows 11):engine::tests_export::same_folder_as_original_exports_next_to_each_photo(expectsA\Exports, getsA/Exports),engine::tests_segment::a_failing_download_ends_with_an_error_and_never_blocks,mcp::backend::tests::malformed_replies_are_rejected_without_resending(WSAECONNRESET 10054 on loopback), and 8 ×ui_egui::tests_folder_drop::*(folder tree with aC:root).
Conditions and impact
See each item.
Recommended remediation
See each item.
Scope / related
CI coverage for Windows is #1050 / PR #1148.
Found in a read-only audit of main at f34c7a8a (AI-assisted, Claude Code; findings were traced in the code, PoCs ran in a scratch checkout outside the repo). Existing issues and open PRs were checked for duplicates before filing.
Activity
ticket-craft commentedon Oct 17, 2026
Thanks! This ticket describes several separate problems:
It helps a lot if each one has its own ticket, so they can be tracked and fixed separately.
Possibly related: #2122, #2133 and #1740.
PierrunoYT commentedon Oct 17, 2026
I'm working on this; a PR will follow.
PierrunoYT commentedon Oct 18, 2026
Closing: I'm no longer working on this.
U.PR: Journal: a second damaged-log copy at the same op gets its own …
U.PR: Thumbnail cache: decode refuses entries past 8192 px from the h…
U.PR: Lightroom import: the catalog archive publishes on volumes with…
U.PR: GPU nn planner: checked layer sizes and buffer products (#2140 …
U.PR: Raw opcodes: FixBadPixelsList skips empty rectangles; an empty …
U.PR: MCP backend tests: a client hanging up with a reset (Windows WS…
LR-EDIT-DETAIL-DENOISE: AI Denoise for finished pictures (JPEG, PNG, …
LR-EDIT-DETAIL-SUPERRES: AI Super Resolution and AI Sharpen with an o…