fix(security): 鉴权签名密钥 fail-closed,禁用仓库内置默认密钥

- ADMIN_TOKEN_SECRET 的随机化闸门由 NODE_ENV 改为 SECURE_MODE:线上以 development 运行时不再使用公开默认密钥(该密钥可伪造管理员/用户 token)

- 运行模式与安全开关常量前移到模块顶部,避免鉴权常量初始化顺序问题

- 启动自检与回归用例同步(109 套件/720 用例全绿)
这个提交包含在:
xcbyy
2026-10-21 12:14:16 +08:00
父节点 dd836b674e
当前提交 40e601e345
共有 3 个文件被更改,包括 28 次插入 和 24 次删除

查看文件

@@ -216,8 +216,10 @@ const syncCurrentUserProfile = async () => {
...currentUserProfile.value,
...cached
};
const storedUid = Number(uni.getStorageSync('userId'));
if (!storedUid) return currentUserProfile.value;
try {
const remote = await getUserProfile(cached.id || 1001);
const remote = await getUserProfile(storedUid);
if (remote && remote.nickname) {
const merged = {
...cached,