Skip to content

fix(YouTube): guard corrupt localStorage in pvPrivacyUI (v6.3.3)#10972

Open
Timeraa wants to merge 1 commit into
mainfrom
fix/youtube-safeparse-corrupt-storage
Open

fix(YouTube): guard corrupt localStorage in pvPrivacyUI (v6.3.3)#10972
Timeraa wants to merge 1 commit into
mainfrom
fix/youtube-safeparse-corrupt-storage

Conversation

@Timeraa

@Timeraa Timeraa commented Jul 6, 2026

Copy link
Copy Markdown
Member

Belt-and-suspenders hardening for a possible co-trigger of the "raw stack trace on YouTube" field report (extension-side central fix is PreMiD/Extension#781).

The two module-load JSON.parse(localStorage.getItem(...)) calls in pvPrivacyUI.ts ran outside any try/catch and threw synchronously at activity load when pmdEnablePrivacy / pmdDisablePrivacy held corrupt JSON. Wrapped in a tiny safeParse that falls back to [].

Metadata patch bump 6.3.2 → 6.3.3.

Testing

On a YouTube tab: localStorage.setItem('pmdEnablePrivacy','{bad'), reload. Before: uncaught trace at activity load. After: no trace, activity works.

The two module-load JSON.parse(localStorage.getItem(...)) calls ran outside any
try/catch and threw synchronously on corrupt pmdEnablePrivacy/pmdDisablePrivacy
storage, aborting activity load. Wrap in a safeParse that falls back to [].
@Timeraa Timeraa requested a review from Bas950 July 6, 2026 20:40
@dimerp

dimerp Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

🖼️ Activity asset preview

I rummaged through the diff and found these. Finders keepers? No? Fine, they're yours.

YouTube (websites/Y/YouTube) — update

Preview Source URL
logo https://cdn.rcd.gg/PreMiD/websites/Y/YouTube/assets/logo.png
thumbnail https://cdn.rcd.gg/PreMiD/websites/Y/YouTube/assets/thumbnail.jpg

Beep boop — I refresh this comment on every push, so no need to scroll. 🤖

@Bas950 Bas950 enabled auto-merge (squash) July 6, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants