fix(security): 鉴权签名密钥 fail-closed,禁用仓库内置默认密钥
- ADMIN_TOKEN_SECRET 的随机化闸门由 NODE_ENV 改为 SECURE_MODE:线上以 development 运行时不再使用公开默认密钥(该密钥可伪造管理员/用户 token) - 运行模式与安全开关常量前移到模块顶部,避免鉴权常量初始化顺序问题 - 启动自检与回归用例同步(109 套件/720 用例全绿)
这个提交包含在:
@@ -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,
|
||||
|
||||
在新工单中引用
屏蔽一个用户