Closed
Bug 1509586
Opened 6 years ago
Closed 6 years ago
ReferenceError: reference to undefined property "securityInfo" msgCompSecurityInfo.js:48:5
Categories
(MailNews Core :: Composition, enhancement)
MailNews Core
Composition
Tracking
(thunderbird_esr6064+ fixed, thunderbird64 fixed, thunderbird65 fixed)
RESOLVED
FIXED
Thunderbird 65.0
People
(Reporter: aceman, Assigned: aceman)
Details
Attachments
(1 file)
1.06 KB,
patch
|
mkmelin
:
review+
jorgk-bmo
:
approval-comm-beta+
jorgk-bmo
:
approval-comm-esr60+
|
Details | Diff | Splinter Review |
Just opening a compose window and using View->"message security info" produces ReferenceError: reference to undefined property "securityInfo" msgCompSecurityInfo.js:48:5 The code is: try { if (params.compFields.securityInfo.requireEncryptMessage) { allow_ldap_cert_fetching = true; } } catch (e) { } If the attribute is optional in params.compFields, we could check for it properly.
Looks like a typo or not migrated code, see https://searchfox.org/comm-central/search?q=requireEncryptMessage&case=true®exp=false&path= and https://searchfox.org/comm-central/source/suite/extensions/smime/content/msgCompSMIMEOverlay.js#223 Further in the msgCompSecurityInfo.js we check for params.smFields.requireEncryptMessage.
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Attachment #9027410 -
Flags: review?(mkmelin+mozilla)
I have tested that params.smFields.requireEncryptMessage does properly return 'false' when not composing encrypted message (I have no SMIME cert).
Right, when the code was landed at https://bug119394.bmoattachments.org/attachment.cgi?id=87208 it had .compFields.securityInfo.requireEncryptMessage at at least 2 places. These days, in msgCompSMIMEOverlay.js params.smFields and params.compFields.composeSecure seems to be the same, due to https://searchfox.org/comm-central/source/mail/extensions/smime/content/msgCompSMIMEOverlay.js#38 and then https://searchfox.org/comm-central/source/mail/extensions/smime/content/msgCompSMIMEOverlay.js#229 .
Comment 5•6 years ago
|
||
Comment on attachment 9027410 [details] [diff] [review] 1509586.patch Review of attachment 9027410 [details] [diff] [review]: ----------------------------------------------------------------- Sure, though I'd prefer if you don't declare it a all. It's only used once. There's the strange while loop which only is ever exercised once. You could remove the loop and have and do the rest in if (params.smFields.requireEncryptMessage)
Attachment #9027410 -
Flags: review?(mkmelin+mozilla) → review+
I have now even imported a SMIME certificate and can toggle to encrypted message and then params.smFields.requireEncryptMessage is 'true'. I have noticed the strange loop that you say and there is more potential cleanup to do. Can I do it in a new bug? The fix here actually allows the following code in the loop to run when params.smFields.requireEncryptMessage is true (encrypted message) and that code tries fetch SMIME certificates for the recipients from LDAP server. That code was dead due to the error for a long time it seems so that feature was broken. Fortunately there is another fetch of missing certs when the message is sent so that may be why this went unnoticed. But this is and enterprise feature which I would propose for ESR60 so the patch should be minimal. Can we agree on that?
Severity: trivial → normal
Comment 7•6 years ago
|
||
Sure, go ahead.
Pushed by mozilla@jorgk.com: https://hg.mozilla.org/comm-central/rev/fab70cf9e354 Look for requireEncryptMessage in params.smFields in msgCompSecurityInfo.js. r=mkmelin
Updated•6 years ago
|
Target Milestone: --- → Thunderbird 65.0
Comment 10•6 years ago
|
||
Comment on attachment 9027410 [details] [diff] [review] 1509586.patch Uplift, right?
Attachment #9027410 -
Flags: approval-comm-esr60+
Attachment #9027410 -
Flags: approval-comm-beta+
Comment 11•6 years ago
|
||
TB 60.3.2 ESR: https://hg.mozilla.org/releases/comm-esr60/rev/cc3a5040f78d7db669a48c77dec43e1790843684
status-thunderbird64:
--- → affected
status-thunderbird65:
--- → fixed
status-thunderbird_esr60:
--- → fixed
tracking-thunderbird_esr60:
--- → 64+
Comment hidden (obsolete) |
Comment 13•6 years ago
|
||
Beta (TB 64 beta 4): https://hg.mozilla.org/releases/comm-beta/rev/54e10abf7960a7c7008c0f929e4ef4f1f730259a
Comment 14•3 years ago
|
||
Hi,
has this fix been applied in 68.* or 78.* ? As I commented in Bug #1275180 fetching S/MIME certificates from an ldap won't work...
You need to log in
before you can comment on or make changes to this bug.
Description
•