Summary: | Bcrypt settings are required for pseudonymization but are not set on upgrade | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens <nick> |
Component: | Architecture, internals, and plumbing | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | andrewfh, dcook, jonathan.druart+koha, mtj |
Version: | master | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28912 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28998 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17336 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31059 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22857 |
||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | 24151 | ||
Bug Blocks: | |||
Attachments: | Example script for koha-conf.xml fixup |
Description
Nick Clemens
2021-08-27 13:52:38 UTC
Mason, is it something we could do? See also 1. commit 242722e99df77be9ce0e4c6d52ff402e0a77d604 Bug 17336: Add api_secret_passphrase entry in packages setup and 2. https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28998#c6 Just got stung by this one. There are quite a few settings like this I think (e.g. plugin_repos, koha_xslt_security, smtp_server). (In reply to David Cook from comment #3) > Just got stung by this one. > > There are quite a few settings like this I think (e.g. plugin_repos, > koha_xslt_security, smtp_server). I'm writing a local script that fixes up a lot of the missing/bad config. It's not very elegant but I could probably share it once I'm done. (In reply to David Cook from comment #4) > (In reply to David Cook from comment #3) > > Just got stung by this one. > > > > There are quite a few settings like this I think (e.g. plugin_repos, > > koha_xslt_security, smtp_server). > > I'm writing a local script that fixes up a lot of the missing/bad config. > It's not very elegant but I could probably share it once I'm done. Basically, I loop through /etc/koha/sites, check each koha-conf.xml, and then re-write it. It does pretty well overall. The output of XML::LibXML is quite similar to /etc/koha/koha-conf-site.xml.in. The main difference is a bit of whitespace and self-closing tags in some of the Zebra-specific configuration within <yazgfs>. Zebra seems fine with empty tags and different whitespace, so I'm fairly content. Half-tempted to submit a patch to make the whitespace for /etc/koha/koha-conf-site.xml.in be more in line with the output of XML::LibXML, but I don't know what folk would think of that... (In reply to David Cook from comment #4) > (In reply to David Cook from comment #3) > > Just got stung by this one. > > > > There are quite a few settings like this I think (e.g. plugin_repos, > > koha_xslt_security, smtp_server). > > I'm writing a local script that fixes up a lot of the missing/bad config. > It's not very elegant but I could probably share it once I'm done. Yes please, share it. Created attachment 144373 [details]
Example script for koha-conf.xml fixup
This is a script I did that uses a reference koha-conf.xml to update some configuration, or just generates missing config (like bcrypt_settings - including comments)
--
I don't think it's particularly robust, so I wouldn't rely on it. I wrote it for a once-off point in time update.
But maybe it could inspire someone to write a koha-conf.xml upgrade tool.
That said, I don't love the idea of automatically upgrading koha-conf.xml. It seems a bit dangerous. Although if a backup mechanism is used (like in my script), then I suppose risk is less as you can always fall back.
|