mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-06-01 12:10:05 +08:00
🐛 fix(security): 修复 macOS 无法打开应用及三平台依赖系统钥匙串的问题
- 密文存储:新增 dailysecret 本地存储引擎,连接/代理/AI 密钥不再依赖系统钥匙串 - 启动迁移:自动将已有钥匙串密文迁移到本地 JSON,用户无感知 - WebKit 迁移:从旧版 Wails WebKit LocalStorage 中恢复连接与代理数据 - DMG 修复:移除 --sandbox-safe 避免扩展属性污染签名,新增 xattr 清理与签名校验 - 安全适配:钥匙串不可用时标记完成而非回滚,消除无钥匙串环境下的阻塞 - 出口脱敏:所有连接/代理 API 返回前统一 sanitize 防止密文泄漏
This commit is contained in:
@@ -1,6 +1,22 @@
|
||||
const isTruthyFlag = (value: string | undefined): boolean => {
|
||||
switch (String(value || '').trim().toLowerCase()) {
|
||||
case '1':
|
||||
case 'true':
|
||||
case 'yes':
|
||||
case 'on':
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
export const shouldEnableMacWindowDiagnostics = (
|
||||
isMacRuntime: boolean,
|
||||
isDevBuild: boolean,
|
||||
envValue?: string,
|
||||
): boolean => {
|
||||
return isMacRuntime && isDevBuild;
|
||||
if (!isMacRuntime || !isDevBuild) {
|
||||
return false;
|
||||
}
|
||||
return isTruthyFlag(envValue);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user