Files
gitea-MIRROR/modules/util
silverwind baccc2d7cd fix: truncate strings on character boundaries (#40267)
Byte slicing like `t.Description[:255]` can split a multi-byte character
and store invalid UTF-8. Team descriptions were also cut to 255 bytes
although their `MaxSize(255)` validation allows 255 characters.

Team descriptions now truncate by runes. Signup user agents, Actions log
lines and access log request IDs use `util.TruncateStringBytes`, which
now returns short strings untouched.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-11-07 11:15:28 +00:00
..
2026-10-24 13:48:19 +00:00
2024-06-11 18:47:45 +00:00
2023-07-04 18:36:08 +00:00
2023-05-08 19:49:59 +08:00