From 5f6107fcee7e072aff401965fdc4217bdbae75eb Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 22 Apr 2022 07:33:28 +0000 Subject: [PATCH] Bug 28998: (follow-up) Add warning on about for missing key Test plan: Make sure that you have no encryption_key in koha-conf. Check about page, system information tab. Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize --- about.pl | 4 ++++ koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/about.pl b/about.pl index 55ffc379fb..ba3434184f 100755 --- a/about.pl +++ b/about.pl @@ -277,6 +277,10 @@ if ( ! C4::Context->config('tmp_path') ) { } } +if( ! C4::Context->config('encryption_key') ) { + push @xml_config_warnings, { error => 'encryption_key_missing' }; +} + # Test Zebra facets configuration if ( !defined C4::Context->config('use_zebra_facets') ) { push @xml_config_warnings, { error => 'use_zebra_facets_entry_missing' }; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index 1438476e29..a3b3bcf3ac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -484,6 +484,13 @@ The effective temporary directory is '[% config_entry.effective_tmp_dir | html %]'. + [% ELSIF config_entry.error == 'encryption_key_missing' %] + + Warning + You are missing the <encryption_key> entry in your koha-conf.xml file. + Please generate a key. We recommend one of at least 32 bytes. (You might use 'pwgen 32' to do so.) + + [% END %] [% END %] -- 2.20.1