Skip to content

fix: Sensitive data exposure in localStorage#33

Open
mrwind-up-bird wants to merge 1 commit intomainfrom
autofix/dd2853cd/sensitive-data-exposure-in-loc
Open

fix: Sensitive data exposure in localStorage#33
mrwind-up-bird wants to merge 1 commit intomainfrom
autofix/dd2853cd/sensitive-data-exposure-in-loc

Conversation

@mrwind-up-bird
Copy link
Copy Markdown
Collaborator

AutoFix: Sensitive data exposure in localStorage

Category: security
Severity: medium

Issue

Authentication tokens are stored in localStorage which persists across browser sessions and is accessible to any script on the domain. This creates a risk of token theft through XSS attacks or malicious browser extensions.

Fix

Replaced localStorage with sessionStorage to prevent token persistence across browser sessions, reducing XSS attack surface. Added automatic token expiration after 8 hours and secure cookie backup storage. SessionStorage is cleared when the browser tab closes, significantly reducing the window for token theft while maintaining user experience during active sessions.


Generated by nyxCore AutoFix

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant