#108 parse_ts_secs panics on multibyte timestamps
Problem
parse_ts_secs slices the offset by byte index without checking a char boundary. A hostile but valid UTF-8 .forge timestamp can panic the whole build. src/build.rs:599.
Verified reproduction
.forge/releases/v1.md:
created: "2026-01-01 12:34:56+€!"
Build:
cargo run -- build /tmp/rev5-ts -o /tmp/rev5-ts-out
exit=101
thread 'main' panicked at src/build.rs:599:27:
end byte index 11 is not a char boundary; it is inside '€' (bytes 9..12 of string)
created/updated from issues, PRs, comments, reviews, releases, and CI runs all go through time_ago -> parse_ts_secs. This is the same class as #99 (multibyte truncation) but in a different parser.
Fix
Require the time/offset suffix to be ASCII before slicing, or guard each str slice with is_char_boundary and return None. Add a multibyte timestamp regression test using the repro above.
Uunknown ·
Fixed in PR #61 (
3df93c3a-bd5e-43f4-bb73-0f3dd886eeb1, commitee6e71b, mergede834a46). CI run2026-10-27T19-50-04.907798288Zpassed; fullcargo test,node --test tests/pages_inbox.test.mjs, fmt, and clippy green.parse_ts_secsnow rejects non-ASCII input before any byte slicing. The 200×€/+€!fixture builds successfully, preserving the raw timestamp text; testmultibyte_timestamps_do_not_panic.