---
id: 7d4b2e5a-09b9-4d6d-bb2e-1aeabb3c5a45
title: parse_ts_secs panics on multibyte timestamps
state: closed
labels:
- kind:build
assignees: []
milestone: null
created: 2026-10-27T18:39:58.917947713Z
updated: 2026-10-27T19:53:10.454706639Z
---
## 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`:

```yaml
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.
