Description
settingsStore.saveProfiles() writes the full visualizerSettings object to themeProfiles.json without calling sanitizeSettings() first. While the data originated from sanitized sources, any in-memory corruption or mutation (e.g., via a memory-mutation bug or extension) gets persisted permanently. In contrast, duplicateThemeProfile does sanitize before saving.
Steps to Reproduce
- Open
settingsStore.js and locate the saveProfiles() function.
- Compare it with
duplicateThemeProfile() in main.js.
- Observe that
saveProfiles() writes raw settings, while duplicateThemeProfile() sanitizes first.
Expected Behaviour
saveProfiles() should call sanitizeSettings() on the profile data before writing to disk.
Actual Behaviour
Settings are written as-is without re-sanitization.
Description
settingsStore.saveProfiles()writes the fullvisualizerSettingsobject tothemeProfiles.jsonwithout callingsanitizeSettings()first. While the data originated from sanitized sources, any in-memory corruption or mutation (e.g., via a memory-mutation bug or extension) gets persisted permanently. In contrast,duplicateThemeProfiledoes sanitize before saving.Steps to Reproduce
settingsStore.jsand locate thesaveProfiles()function.duplicateThemeProfile()inmain.js.saveProfiles()writes raw settings, whileduplicateThemeProfile()sanitizes first.Expected Behaviour
saveProfiles()should callsanitizeSettings()on the profile data before writing to disk.Actual Behaviour
Settings are written as-is without re-sanitization.