From: Michael M Slusarz Date: Wed, 11 Aug 2010 05:57:51 +0000 (-0600) Subject: Request #7962: PGP reply validate preference X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=37e91a0bdbf9afef33a9b6fcd1521c5ff30f8fb6;p=horde.git Request #7962: PGP reply validate preference Add preference to control if we check for recipient PGP public keys when replying. --- diff --git a/imp/compose.php b/imp/compose.php index 224782751..6407b8219 100644 --- a/imp/compose.php +++ b/imp/compose.php @@ -651,7 +651,9 @@ foreach (array('to', 'cc', 'bcc', 'subject') as $val) { $encrypt_options = $prefs->isLocked('default_encrypt') ? $prefs->getValue('default_encrypt') : $vars->encrypt_options; -if ($prefs->getValue('use_pgp') && !$prefs->isLocked('default_encrypt')) { +if ($prefs->getValue('use_pgp') && + !$prefs->isLocked('default_encrypt') && + $prefs->getValue('pgp_reply_pubkey')) { $default_encrypt = $prefs->getValue('default_encrypt'); if (!$vars->compose_formToken && in_array($default_encrypt, array(IMP::PGP_ENCRYPT, IMP::PGP_SIGNENC))) { diff --git a/imp/config/prefs.php.dist b/imp/config/prefs.php.dist index db69d526b..e602ca4c7 100644 --- a/imp/config/prefs.php.dist +++ b/imp/config/prefs.php.dist @@ -1512,7 +1512,7 @@ $prefGroups['pgp'] = array( 'desc' => sprintf(_("Control PGP support for %s."), $GLOBALS['registry']->get('name')), 'members' => array( 'use_pgp', 'use_pgp_text', 'pgp_attach_pubkey', 'pgp_scan_body', - 'pgp_verify', 'pgppublickey', 'pgpprivatekey' + 'pgp_verify', 'pgp_reply_pubkey', 'pgppublickey', 'pgpprivatekey' ) ); @@ -1550,6 +1550,14 @@ $_prefs['pgp_verify'] = array( 'help' => 'pgp-option-verify' ); +$_prefs['pgp_reply_pubkey'] = array( + 'value' => 1, + 'advanced' => true, + 'type' => 'checkbox', + 'desc' => _("Check for valid recipient PGP public keys while replying?"), + 'help' => 'pgp-option-reply-pubkey' +); + $_prefs['pgppublickey'] = array( 'type' => 'special' ); diff --git a/imp/docs/CHANGES b/imp/docs/CHANGES index a508339ea..9e99a7c38 100644 --- a/imp/docs/CHANGES +++ b/imp/docs/CHANGES @@ -2,6 +2,8 @@ v5.0-git -------- +[mms] Add preference to control if we check for recipient PGP public keys + when replying (Request #7962). [mms] Add preference to allow for automatic spam reporting when explicitly moving messages to the Spam mailbox (Request #6455). [mms] Automatically determine view based on browser and 'dynamic_view' diff --git a/imp/lib/Prefs/Ui.php b/imp/lib/Prefs/Ui.php index 90bc98508..f67440f11 100644 --- a/imp/lib/Prefs/Ui.php +++ b/imp/lib/Prefs/Ui.php @@ -210,6 +210,7 @@ class IMP_Prefs_Ui $ui->suppress[] = 'pgp_attach_pubkey'; $ui->suppress[] = 'pgp_scan_body'; $ui->suppress[] = 'pgp_verify'; + $ui->suppress[] = 'pgp_reply_pubkey'; $ui->suppress[] = 'pgppublickey'; $ui->suppress[] = 'pgpprivatekey'; } diff --git a/imp/locale/en_US/help.xml b/imp/locale/en_US/help.xml index df43d4bc5..b74a9c271 100644 --- a/imp/locale/en_US/help.xml +++ b/imp/locale/en_US/help.xml @@ -347,6 +347,14 @@ + + PGP: Validate PGP Public Keys When Replying + Validate PGP Public Keys When Replying + + If set, and PGP encryption is used by default for composing messages, IMP will verify that it can access all recipients' public keys when the reply is first created. This has the disadvantage that it may cause a delay in opening the reply window. However, it has the advantage of informing you immediately if you will be able to correctly send the encrypted message to all recipients immediately. + + + Message Composition: Encryption Options No Encryption