Closed
Bug 2046883
Opened 5 months ago
Closed 5 months ago
OpenPGP keyRing.sys.mjs has incorrect implementation for getCacheEmpty()
Categories
(MailNews Core :: Security: OpenPGP, defect)
MailNews Core
Security: OpenPGP
Tracking
(Not tracked)
RESOLVED
FIXED
153 Branch
People
(Reporter: KaiE, Assigned: KaiE)
References
Details
(Keywords: ai-involved)
Attachments
(1 external file)
Claude code helped me identify this during a code review.
keyring.sys.mjs declares
let gKeyIndex = [];
but uses
gKeyIndex.length === 0;
to check for empyness.
This isn't guaranteed to work because this code returns also zero:
let gMyArr = [];
gMyArr["a1234567"] = {};
gMyArr["b2345678"] = {};
gMyArr["c3456789"] = {};
gMyArr.length;
| Assignee | ||
Comment 1•5 months ago
|
||
Updated•5 months ago
|
Assignee: nobody → kaie
Status: NEW → ASSIGNED
| Assignee | ||
Updated•5 months ago
|
Keywords: checkin-needed-tb
Pushed by corey@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/336ee1192b91
Use Map not [] in keyRing.sys for gKeyIndex and gSubkeyIndex. r=mkmelin
Updated•5 months ago
|
Target Milestone: --- → 153 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•