Skip to content

[BUG] [ENHANCEMENT] saveProfiles() persists unsanitized settings to disk #404

Description

@Kirtan-pc

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

  1. Open settingsStore.js and locate the saveProfiles() function.
  2. Compare it with duplicateThemeProfile() in main.js.
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions