mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
Handle '\n' line breaks in PEM-encoded SSL/TLS certificates
For example Podman, handling OCI containers, does not seem to have a way to pass multi-line strings via env files (and Docker seems to have the same issue at least outside of docker-compose). Thus this change allows 'LDAP_CA_CERT' to handle a string with '\n', because currently only 0x0A aka LF might work. An example for additionally supported format: LDAP_CA_CERT=-----BEGIN CERTIFICATE-----\n...\n...\n...\n-----END CERTIFICATE----- See also: https://github.com/wekan/wekan/issues/3484
This commit is contained in:
parent
1189b66748
commit
927d15f2d8
1 changed files with 1 additions and 1 deletions
|
@ -100,7 +100,7 @@ export default class LDAP {
|
|||
|
||||
if (this.options.ca_cert && this.options.ca_cert !== '') {
|
||||
// Split CA cert into array of strings
|
||||
const chainLines = this.constructor.settings_get('LDAP_CA_CERT').split('\n');
|
||||
const chainLines = this.constructor.settings_get('LDAP_CA_CERT').replace(/\\n/g,'\n').split('\n');
|
||||
let cert = [];
|
||||
const ca = [];
|
||||
chainLines.forEach((line) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue