Closed Bug 272304 Opened 20 years ago Closed 19 years ago

security options don't appear from mail compose window

Categories

(Thunderbird :: Message Compose Window, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Thunderbird1.1

People

(Reporter: bugzilla, Assigned: mscott)

Details

(Keywords: fixed-aviary1.0)

Attachments

(2 files)

not sure if this is already known (couldn't find an open bug after a quick
search). found using 2004112905-0.9 tbird bits on linux fc2.

1. open a mail compose window.

2. from the menubar select Options > Security > Encrypt this Message --or--
Digitally Sign this Message. (using the toolbar menu button equivalents also
exhibits this bug.)

3. I don't have any certs or have encryption setup, so I get a dialog, "You need
to setup one or more personal certificates before you can use this security
feature. Would you like to learn how to do this now?"

4. click the Yes button.

results: no dialog appears --shouldn't the certificate manager appear? not sure
if the cert manager is the same place for both encryption and digital signature
setup...

instead I get the following js error:

Error: openHelp is not defined
Source File: chrome://messenger-smime/content/msgCompSMIMEOverlay.js
Line: 152
I cited this issue in the bug about hiding all the help buttons because this
dialog is owned by the security module and we don't really have permission to
change it (at least not easily).
(also occurs on mac -> all)

Scott: oh, right. drat about that! so, would restriction of the security module
also preclude launching the Certificate Manager, when hitting the Yes button here?
Keywords: relnote
OS: Linux → All
Hardware: PC → All
I lied. We do own this dialog. I thought the crypto library did.

Patch coming up to hide the Help button (that's really the issue here right?)

actually, there's no Help button here. when you select either of these commands
you get a Yes/No dialog. so I'm not sure what the best route would be...
Attached patch the fixSplinter Review
Fork msgCompSecurityInfo.xul from the one in mailnews.

The only change to the file is to remove the help button.
Comment on attachment 167374 [details] [diff] [review]
the fix

David see my comments above about the only change to this forked file.
Attachment #167374 - Flags: superreview?(bienvenu)
or perhaps we could just say (in the dialog), go to the Options/Preferences >
Advanced > Certificate > Certificate Manager (er, prolly more nicely than that ;).

Scott, as I mentioned earlier, there isn't a Help button here.
(In reply to comment #4)
> actually, there's no Help button here. when you select either of these commands
> you get a Yes/No dialog. so I'm not sure what the best route would be...

Oh I understood what you were doing (and said, correctly so, that we can't
control that) and then I misunderstood what you were doing and fixed a problem
with the help button showing up in the security info dialog.

This patch gets rid of the help button in that dialog. I'd like to check this
into the branch if you feel that you will have time to verify it in tomorrow's
builds. Otherwise we can punt on it. 
Status: NEW → ASSIGNED
Attachment #167374 - Flags: superreview?(bienvenu) → superreview+
Sarah, what would you like to do with this patch. I can check it in for 1.0 if
you are able to QA it into tomorrow's bits. It removes the help button from the
security info dialog. Otherwise we'll pass and just check it into the trunk. 
hiding the help button has been checked into the branch and trunk.

Leaving open for the remaining issue sarah originally reported.
Sarah, going back to the original problem as you reported, what do you think we
should do:

1) Open the account manager (we cannot pre-select the security panel for a given
account though so the user would have to go click on Security)

or

2) Open the certificate manager dialog for adding certificates. Even after you
add a cert here though you'll need to go back to the account settings dialog to
configure that cert to be used for encryption or signing.
This fixes the problem Sarah originally reported.

1) Changed the text of the prompt to say "You need to set up one or more
personal certificates before you can use this security feature. Would you like
to do so now?"

2) Clicking yes brings up the account manager with the appropriate server
(based on the identity in the compose window) selected. If the server has a
security panel then we pre-load the security panel too.
Comment on attachment 167387 [details] [diff] [review]
fix for the original issue Sarah reported

David, here's what really changed in the forked file:

Index: msgCompSMIMEOverlay.js
===================================================================
RCS file:
/cvsroot/mozilla/mailnews/extensions/smime/resources/content/msgCompSM
IMEOverlay.js,v
retrieving revision 1.14
diff -u -r1.14 msgCompSMIMEOverlay.js
--- msgCompSMIMEOverlay.js	18 Dec 2002 12:55:36 -0000	1.14
+++ msgCompSMIMEOverlay.js	30 Nov 2004 02:49:19 -0000
@@ -126,6 +126,18 @@
   }
 }

+// stub routine to make our call to MsgAccountManager work correctly
+function GetSelectedFolderURI()
+{
+  return;
+}
+
+function GetServer(uri)
+{
+  var servers = gAccountManager.GetServersForIdentity(gCurrentIdentity);
+  return servers.QueryElementAt(0,
Components.interfaces.nsIMsgIncomingServer);

+}
+
 function showNeedSetupInfo()
 {
   var ifps = Components.interfaces.nsIPromptService;
@@ -149,7 +161,7 @@
       dummy);

     if (0 == buttonPressed) {
-      openHelp("sign-encrypt");
+      MsgAccountManager('am-smime.xul');
     }
   }
 }

Note: MsgAccountManager calls GetFolderURI and GetServer inside of a try catch
so even if we through an exception it handles that.
Attachment #167387 - Flags: superreview?(bienvenu)
ha, mid-air collision --but your comment/fix effectively addressed what I was
about to say. :)
Attachment #167387 - Flags: superreview?(bienvenu) → superreview+
both patches are on the 1.0 branch for you to test tomorrow Sarah.
Keywords: relnotefixed-aviary1.0
Target Milestone: --- → Thunderbird1.0
looks good on Windows build 2004-11-30-05-0.9
vrfy'd fixed with 2004113005-0.9 (linux fc2) for both the security info dialog
(no more Help button) and the dialog behavior resulting from "encrypt message"
and "digitally sign message." thanks, Scott!
also works find on mac os x 10.3.6 (2004113002-0.9).
The second patch here never made it to the trunk until tonight. 
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Target Milestone: Thunderbird1.0 → Thunderbird1.1
I know it's tardy, but: vrfy'd fixed with recent trunk builds, at least, eg
2005060606-trunk on OS X 10.4.1.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: