fix: prevent encryption key loss and IndexedDB connection errors
Some checks failed
CodeQL Analysis / Analyze CodeQL (push) Has been cancelled
Mirror to Codeberg / mirror (push) Has been cancelled
Mirror to PrivacyGuides / mirror (push) Has been cancelled

- Disable timer-based key rotation for Double Ratchet mode
- Auto-reinitialize encryption keys when missing but ECDH available
- Preserve active keys during periodic cleanup in ratchet sessions
- Fix IndexedDB "database closing" errors with connection checking
- Add individual transactions per queue item to prevent race conditions
This commit is contained in:
lockbitchat
2025-11-04 13:14:24 -04:00
parent 207e51361c
commit 79c8d08782
12 changed files with 315 additions and 67 deletions

8
sw.js
View File

@@ -1,9 +1,9 @@
// SecureBit.chat Service Worker
// Conservative PWA Edition v4.4.99 - Minimal Caching Strategy
// Conservative PWA Edition v4.5.22 - Minimal Caching Strategy
const CACHE_NAME = 'securebit-pwa-v4.4.99';
const STATIC_CACHE = 'securebit-pwa-static-v4.4.99';
const DYNAMIC_CACHE = 'securebit-pwa-dynamic-v4.4.99';
const CACHE_NAME = 'securebit-pwa-v4.5.22';
const STATIC_CACHE = 'securebit-pwa-static-v4.5.22';
const DYNAMIC_CACHE = 'securebit-pwa-dynamic-v4.5.22';
// Essential files for PWA offline functionality
const STATIC_ASSETS = [