Problem (audit D3)
static/js/document.js _sigCache = new Map() stores signature data_urls (base64, ~33% larger than binary) and is never bounded or evicted — it only grows. emailLibrary._libListCache already uses an LRU cap (_LIB_CACHE_MAX); _sigCache should too.
Bounded by the number of signatures (usually small), so low impact — but an unbounded cache is the wrong default.
Fix
Add a max size + evict-oldest on insert, mirroring _libListCache. Affected: static/js/document.js.
Problem (audit D3)
static/js/document.js_sigCache = new Map()stores signaturedata_urls (base64, ~33% larger than binary) and is never bounded or evicted — it only grows.emailLibrary._libListCachealready uses an LRU cap (_LIB_CACHE_MAX);_sigCacheshould too.Bounded by the number of signatures (usually small), so low impact — but an unbounded cache is the wrong default.
Fix
Add a max size + evict-oldest on insert, mirroring
_libListCache. Affected:static/js/document.js.