mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-10-27 05:30:39 +00:00
* fix(i18n): survive a malformed locale cookie getLocaleFromCookie decoded the raw cookie value without a guard, so a malformed percent-encoding threw URIError during locale bootstrap and in formatTimeAgo. It also split the cookie on every "=", truncating values that contain one. Decode defensively and split on the first "=" only. * fix(i18n): normalize the cookie locale in formatTimeAgo The second caller of getLocaleFromCookie cast the raw value to Locale, so a malformed-but-known-prefixed cookie skipped normalization. Normalize it like useI18n does, and cover the malformed and valid cookie paths. --------- Co-authored-by: 一片一片 <192845873+gdut4140@users.noreply.github.com>