fix(maps): exclude stadia key from localStorage cache

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
James Smith
2026-04-13 22:11:34 +01:00
parent e4df3eaecb
commit f97782724e
2 changed files with 8 additions and 4 deletions

View File

@@ -226,8 +226,12 @@ const Settings = {
async _save(key, value) {
this._cache[key] = value;
// Save to localStorage as backup
localStorage.setItem('intercept_settings', JSON.stringify(this._cache));
// Save to localStorage as backup (exclude sensitive keys)
const SENSITIVE_KEYS = ['offline.stadia_key'];
const toStore = Object.fromEntries(
Object.entries(this._cache).filter(([k]) => !SENSITIVE_KEYS.includes(k))
);
localStorage.setItem('intercept_settings', JSON.stringify(toStore));
// Save to server
try {