fix: close remaining security remediation gaps

This commit is contained in:
sagitchu
2026-05-14 11:10:06 +08:00
parent f0facf6703
commit abf13bdac9
5 changed files with 182 additions and 23 deletions
+9 -1
View File
@@ -144,7 +144,15 @@ export const configCache = {
// 设置缓存的配置
set: (key: string, value: string): void => {
const cacheKey = CACHE_PREFIX + key;
const normalizedKey = key.trim().toLowerCase();
if (!shouldPersistConfigKey(normalizedKey)) {
configCache.remove(normalizedKey);
return;
}
const cacheKey = CACHE_PREFIX + normalizedKey;
localStorage.setItem(cacheKey, value);
},