Bug 24151: Add key to the config
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 26 Nov 2019 20:07:04 +0000 (21:07 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 20 Jul 2020 13:17:42 +0000 (15:17 +0200)
Sponsored-by: Association KohaLa - https://koha-fr.org/

Signed-off-by: Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

debian/scripts/koha-create
debian/templates/koha-conf-site.xml.in
etc/koha-conf.xml

index b90e7d4..5cc3f2f 100755 (executable)
@@ -111,6 +111,7 @@ generate_config_file() {
         -e "s/__UNIXGROUP__/$username/g" \
         -e "s#__TEMPLATE_CACHE_DIR__#$TEMPLATE_CACHE_DIR#g" \
         -e "s#__TIMEZONE__#$TIMEZONE#g" \
+        -e "s#__KEY__#$KEY#g" \
         -e "s#__UPLOAD_PATH__#$UPLOAD_PATH#g" \
         -e "s#__TMP_PATH__#$TMP_PATH#g" \
         -e "s/__LOG_DIR__/\/var\/log\/koha\/$name/g" \
@@ -495,6 +496,9 @@ if [ "${CLO_ELASTICSEARCH_SERVER}" != "" ]; then
     ELASTICSEARCH_SERVER="${CLO_ELASTICSEARCH_SERVER}"
 fi
 
+KEY=$(htpasswd -bnBC 10 "" password | tr -d ':\n' | sed 's/$2y/$2a/');
+
+
 if [ "$ENABLE_SRU" != "no" ]; then
     enable_sru_server
 fi
index fe71b9a..099a65b 100644 (file)
@@ -403,6 +403,9 @@ __END_SRU_PUBLICSERVER__
       server. e.g. Antarctica/South_Pole -->
  <timezone>__TIMEZONE__</timezone>
 
+ <!-- This is the salt used to generated anonymized content -->
+ <key>__KEY__</key>
+
  <!-- flag for development purposes
       dev_install is used to adjust some paths specific to dev installations
       strict_sql_modes should not be used in a production environment
index 9e6cb59..f3697ed 100644 (file)
@@ -227,6 +227,9 @@ __PAZPAR2_TOGGLE_XML_POST__
       server. e.g. Antarctica/South_Pole -->
  <timezone></timezone>
 
+ <!-- This is the salt used to generated anonymized content -->
+ <key>__KEY__</key>
+
  <!-- flag for development purposes
       dev_install is used to adjust some paths specific to dev installations
       strict_sql_modes should not be used in a production environment