Skip to content

fix: strip secret key from offline queue, prompt on replay - #376

Merged
Mystery-CLI merged 2 commits into
Ethereal-Future:mainfrom
johnsaviour56-ship-it:fix/offline-queue-strip-secret-key
Apr 23, 2026
Merged

fix: strip secret key from offline queue, prompt on replay#376
Mystery-CLI merged 2 commits into
Ethereal-Future:mainfrom
johnsaviour56-ship-it:fix/offline-queue-strip-secret-key

Conversation

@johnsaviour56-ship-it

Copy link
Copy Markdown
Contributor

Summary

This PR fixes a critical security issue in frontend/src/hooks/useOfflineQueue.js where the full payment payload—including sourceSecret—was being persisted to localStorage. Since localStorage is accessible to any JavaScript running on the same origin, this exposed sensitive credentials to potential theft or XSS attacks.

Changes

  1. Removed sourceSecret from all offline queue persistence logic
  2. Updated offline queue to store only non-sensitive payment intent data:
  • destination
  • amount
  • asset
  1. Added flow to prompt users to re-enter their secret key when reconnecting online
  2. Adjusted queue replay logic to require fresh authentication input before execution

Security Impact

  • Prevents sensitive key exposure via browser storage
  • Mitigates risk from XSS and malicious injected scripts
  • Aligns frontend behavior with secure key management practices

Behavioral Impact

  1. Before: Full payment payload (including secret key) stored in localStorage and replayed automatically
  2. After: Only payment intent is stored; secret key must be re-entered after reconnection

Tests / Validation

  • Verified offline payments queue without storing sensitive data
  • Confirmed replay flow requires user re-authentication
  • Ensured no regression in offline/online payment transitions

Acceptance Criteria

  • sourceSecret removed from persisted offline queue
  • Only payment intent data stored in localStorage
  • User prompted to re-enter secret key on reconnect
  • Offline payment flow remains functional without credential leakage

Closes #233

@drips-wave

drips-wave Bot commented Apr 23, 2026

Copy link
Copy Markdown

@johnsaviour56-ship-it 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! 🚀

Learn more about application limits

@Mystery-CLI
Mystery-CLI merged commit 698f622 into Ethereal-Future:main Apr 23, 2026
7 of 28 checks passed
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.

stores in

2 participants