mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-13 04:17:14 +00:00
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>