Repository navigation
fix(dashboard): don't expose wallet address in expiry-notified storage key (#548) - #635
Merged
nonsobethel0-dev merged 3 commits intoSep 23, 2026
Conversation
The dashboard stored notified policy IDs under ps_expiry_notified_<walletAddress>, exposing the raw address in DevTools > Session Storage key names. Add lib/storageKeys with a small deterministic non-reversible fingerprint (cyrb53) and expiryNotifiedStorageKey(address), and use it for the dashboard's notified-policies key. Closes Parashield-Protocol#548
Assert the key never contains the raw (or truncated) wallet address, is stable for the same wallet, and differs between wallets. Refs Parashield-Protocol#548
|
@boluwacodes Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
❌ Deploy Preview for boisterous-sunshine-dd4c4c failed.
|
nonsobethel0-dev
merged commit Sep 23, 2026
7e1fd74
into
Parashield-Protocol:main
0 of 4 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DashboardPagestored the IDs of policies it had already warned about under thesessionStoragekeyps_expiry_notified_${address}. Anyone looking at DevTools → Application → Session Storage could read the raw Stellar wallet address in the key name.Changes
Commit 1: fix
src/lib/storageKeys.tsfingerprint(value): a small, deterministic, non-reversible 53-bit hash (cyrb53) that returns a short base-36 string. It is synchronous, so it works inside the existing effect without an asynccrypto.subtlecall.expiryNotifiedStorageKey(address): returnsps_expiry_notified_<fingerprint>.src/app/dashboard/page.tsx: the effect builds its key withexpiryNotifiedStorageKey(address). Nothing else in the effect changes.Commit 2: tests (
src/__tests__/storageKeys.test.ts)Notes
sessionStorageis cleared when the tab closes, so no migration is needed.useExpiryWarningshook. The two changes touch the same one line. Whichever merges second only needsexpiryNotifiedStorageKey(address)in place of the template string.Testing
tsc --noEmitreports no errors in the changed or new files.Closes #548
Closes #549
Closes #550
Closes #551