mirror of
https://code.gri.mw/GUI/grim.git
synced 2026-07-15 11:18:55 +00:00
ef58f260e8
Two self-contained hardening measures: - WebSocket frame cap: the Tor relay transport dialed every relay with tungstenite's default 64 MiB message / 16 MiB frame ceiling. Pass a WebSocketConfig capping both to 4 MiB via client_async_tls_with_config, so a hostile or buggy relay can't stream a giant frame into wallet memory. The pool only requires max_message_length >= 128 KiB and the wallet's own events are far smaller, so 4 MiB keeps ample headroom. - Secret zeroization: the raw NIP-44 v3 ECDH conversation keys in wrapv3.rs are now Zeroizing<[u8; 32]> so they are scrubbed from memory on drop instead of lingering. zeroize (already a transitive dep) is pulled in directly. Adds a ws-config test asserting the caps sit below the tungstenite defaults and above the pool minimum.