Bugzilla – Attachment 55818 Details for
Bug 17336
api_secret_passphrase missing in packages setup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17336: Add api_secret_passphrase entry in packages setup
Bug-17336-Add-apisecretpassphrase-entry-in-package.patch (text/plain), 2.80 KB, created by
Josef Moravec
on 2016-09-26 08:53:07 UTC
(
hide
)
Description:
Bug 17336: Add api_secret_passphrase entry in packages setup
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2016-09-26 08:53:07 UTC
Size:
2.80 KB
patch
obsolete
>From e012d31db8c1ef0c2039b647c765304bf5f8f917 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 23 Sep 2016 11:56:40 -0300 >Subject: [PATCH] Bug 17336: Add api_secret_passphrase entry in packages setup > >Bug 13799 introduced the api_secret_passphrase on source installs, but missed to do so on packages. > >This patch introduces the entry on the template koha-conf-site.xml.in file, and >patches koha-create so it generates a randomized string (64 chars) to put in it. > >To test: >- Apply the patch >- Grab the new template file: > $ sudo cp kohaclone/debian/templates/koha-conf-site.xml.in \ > /etc/koha >- Create a new instance: > $ kohaclone/debian/scripts/koha-create --create-db blah >=> SUCCESS: The script runs fine, /etc/koha/sites/blah/koha-conf.xml > contains the api_secret_passphrase entry. >- Sign off :-D > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > debian/scripts/koha-create | 4 +++- > debian/templates/koha-conf-site.xml.in | 5 ++++- > 2 files changed, 7 insertions(+), 2 deletions(-) > >diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create >index 7fba8e6..e416c8c 100755 >--- a/debian/scripts/koha-create >+++ b/debian/scripts/koha-create >@@ -105,6 +105,7 @@ generate_config_file() { > -e "s/__END_BIBLIOS_RETRIEVAL_INFO__/`echo $END_BIBLIOS_RETRIEVAL_INFO`/g" \ > -e "s/__START_AUTHORITIES_RETRIEVAL_INFO__/`echo $START_AUTHORITIES_RETRIEVAL_INFO`/g" \ > -e "s/__END_AUTHORITIES_RETRIEVAL_INFO__/`echo $END_AUTHORITIES_RETRIEVAL_INFO`/g" \ >+ -e "s/__API_SECRET__/$API_SECRET/g" \ > -e "s/__DB_NAME__/$mysqldb/g" \ > -e "s/__DB_HOST__/$mysqlhost/g" \ > -e "s/__DB_USER__/$mysqluser/g" \ >@@ -403,7 +404,8 @@ DEFAULT_MEMCACHED_PREFIX="koha_" > UPLOAD_PATH_BASE="/var/lib/koha" > UPLOAD_DIR="uploads" > UPLOAD_PATH="" >- >+# Generate a randomizaed API secret >+API_SECRET="$(pwgen -s 64 1)" > # SRU server variables > ENABLE_SRU="no" > SRU_SERVER_PORT="" >diff --git a/debian/templates/koha-conf-site.xml.in b/debian/templates/koha-conf-site.xml.in >index 8f7af30..6bfe004 100644 >--- a/debian/templates/koha-conf-site.xml.in >+++ b/debian/templates/koha-conf-site.xml.in >@@ -292,7 +292,10 @@ __END_SRU_PUBLICSERVER__ > <memcached_servers>__MEMCACHED_SERVERS__</memcached_servers> > <memcached_namespace>__MEMCACHED_NAMESPACE__</memcached_namespace> > >-<!-- true type font mapping accoding to type from $font_types in C4/Creators/Lib.pm --> >+ <!-- Secret passphrase used by Mojolicious for signed cookies --> >+ <api_secret_passphrase>__API_SECRET__</api_secret_passphrase> >+ >+ <!-- true type font mapping accoding to type from $font_types in C4/Creators/Lib.pm --> > <ttf> > <font type="TR" >/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf</font> > <font type="TB" >/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Bold.ttf</font> >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17336
:
55778
|
55818
|
55830