From 9e2b9a9fcd77edf7a149a37f5d7d22294ef4992f Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Tue, 27 Aug 2024 12:12:33 +0200 Subject: [PATCH] Show GnuPG version for #1560 --- dev/Settings/Admin/Security.js | 2 ++ snappymail/v/0.0.0/app/libraries/RainLoop/ActionsAdmin.php | 3 +++ .../0.0.0/app/templates/Views/Admin/AdminSettingsSecurity.html | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dev/Settings/Admin/Security.js b/dev/Settings/Admin/Security.js index 8bcac6e48..c9e9d8276 100644 --- a/dev/Settings/Admin/Security.js +++ b/dev/Settings/Admin/Security.js @@ -32,6 +32,8 @@ export class AdminSettingsSecurity extends AbstractViewSettings { capaOpenPGP: SettingsCapa('OpenPGP') }); + this.gnuPGversion = 'GnuPG v' + SettingsGet('gnupg'); + const reset = () => { this.saveError(false); this.saveSuccess(false); diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/ActionsAdmin.php b/snappymail/v/0.0.0/app/libraries/RainLoop/ActionsAdmin.php index 6d3fac5aa..54a550d35 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/ActionsAdmin.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/ActionsAdmin.php @@ -456,6 +456,9 @@ class ActionsAdmin extends Actions $aResult['Admin']['language'] = $oActions->ValidateLanguage($oConfig->Get('admin_panel', 'language', 'en'), '', true); $aResult['Admin']['languages'] = \SnappyMail\L10n::getLanguages(true); $aResult['Admin']['clientLanguage'] = $oActions->ValidateLanguage($oActions->detectClientLanguage(true), '', true, true); + + $gnupg = \SnappyMail\PGP\GnuPG::getInstance(''); + $aResult['gnupg'] = $gnupg ? $gnupg->getEngineInfo()['version'] : null; } else { $passfile = APP_PRIVATE_DATA.'admin_password.txt'; $sPassword = $oConfig->Get('security', 'admin_password', ''); diff --git a/snappymail/v/0.0.0/app/templates/Views/Admin/AdminSettingsSecurity.html b/snappymail/v/0.0.0/app/templates/Views/Admin/AdminSettingsSecurity.html index e29fcd06c..d96bf34bf 100644 --- a/snappymail/v/0.0.0/app/templates/Views/Admin/AdminSettingsSecurity.html +++ b/snappymail/v/0.0.0/app/templates/Views/Admin/AdminSettingsSecurity.html @@ -17,7 +17,7 @@