cca3cf8f84
Replace byte-level `&val[..4]` slice with `char_indices().nth(4)` to prevent a panic when the captured credential value contains multi-byte UTF-8 characters (e.g. Chinese text). Adds a regression test with CJK input. Closes #3024 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>