diff --git a/CHANGELOG.md b/CHANGELOG.md index 412b3b6f..73a23245 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ - fix: |Frontend| 收窄地址管理相关弹窗宽度,并让地址表格在弹窗内部横向滚动,避免多地址场景撑宽弹窗 - fix: |Frontend| 修复 `/open_api/settings` 未返回 `domains` 数组时前端设置初始化直接调用 `map()` 报 `undefined` 错误的问题,统一按空数组兜底处理 - fix: |Frontend| 修复前端在 `jwt` / `auth` / `adminAuth` 等 localStorage 凭据为空字符串、字面量 `"undefined"` 或包含换行/控制符时,请求构造的 `Authorization` 等头部抛出 `Invalid character in header content` 导致前端所有接口报错的问题(issue #1000)。新增 `safeHeaderValue` / `safeBearerHeader` 工具,对全部认证头做 RFC 7230 校验,不安全的值直接跳过该头部,让 worker 走标准 401 而不是请求级崩溃 +- fix: |Frontend| 修复多语言菜单在移动端顶部显示语言与版本按钮导致 Header 横向拥挤或溢出的问题,移动端仅保留菜单按钮并将语言/版本入口放入抽屉 ### Improvements diff --git a/CHANGELOG_EN.md b/CHANGELOG_EN.md index a5c69f4d..c6527f97 100644 --- a/CHANGELOG_EN.md +++ b/CHANGELOG_EN.md @@ -24,6 +24,7 @@ - fix: |Frontend| Narrow address-management modal widths and keep address tables horizontally scrollable inside the modal to prevent multi-address lists from stretching the dialog - fix: |Frontend| Fix the frontend settings bootstrap throwing an `undefined` error when `/open_api/settings` does not return a `domains` array by normalizing the field to an empty array before mapping it - fix: |Frontend| Fix every API call crashing client-side with `Invalid character in header content ["Authorization"]` when stale localStorage credentials (`jwt` / `auth` / `adminAuth` / `userJwt` / `access_token`) are empty, the literal string `"undefined"`, or contain a stray newline or other control character (issue #1000). Adds `safeHeaderValue` / `safeBearerHeader` helpers that validate every auth header against RFC 7230 and omit the header entirely when unsafe, so the worker returns a clean 401 instead of the request being rejected by axios/undici +- fix: |Frontend| Fix the multilingual header on mobile by keeping only the menu button in the top bar and moving language/version actions into the drawer to avoid horizontal crowding or overflow ### Improvements diff --git a/frontend/src/views/Header.vue b/frontend/src/views/Header.vue index 6a92e448..c93a8c10 100644 --- a/frontend/src/views/Header.vue +++ b/frontend/src/views/Header.vue @@ -7,7 +7,7 @@ import { useIsMobile } from '../utils/composables' import { DarkModeFilled, LightModeFilled, MenuFilled, AdminPanelSettingsFilled, MonitorHeartFilled, - KeyboardArrowDownOutlined + KeyboardArrowDownOutlined, OpenInNewOutlined } from '@vicons/material' import { GithubAlt, Language, User, Home } from '@vicons/fa' @@ -254,13 +254,13 @@ onMounted(async () => {