Fix for #2989 server crash due to #2986.
Ylian Saint-Hilaire committed
Aug 5, 2021 at 08:43 UTC
ad0b60a560bb3d5917973f39a2be579885344cf6
2 files changed
+3
-3
certoperations.js
+1
-1
@@ -175,7 +175,7 @@ module.exports.CertificateOperations = function (parent) {
175
176
if ((typeof acmconfig.certpfx == 'string') && (typeof acmconfig.certpfxpass == 'string')) {
177
// P12 format, certpfx and certpfxpass
178
- try { r = obj.loadPfxCertificate(obj.parent.common.joinPath(obj.parent.datapath, acmconfig.certpfx), acmconfig.certpfxpass); } catch (ex) { console.log(ex); }
178
+ try { r = obj.loadPfxCertificate(parent.common.joinPath(obj.parent.datapath, acmconfig.certpfx), acmconfig.certpfxpass); } catch (ex) { console.log(ex); }
179
if ((r == null) || (r.certs == null) || (r.keys == null) || (r.certs.length < 2) || (r.keys.length != 1)) continue;
180
} else if ((typeof acmconfig.certfiles == 'object') && (typeof acmconfig.keyfile == 'string')) {
181
// PEM format, certfiles and keyfile
webserver.js
+2
-2
@@ -5916,7 +5916,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
5916
if ((typeof domain.authstrategies.saml.cert != 'string') || (typeof domain.authstrategies.saml.idpurl != 'string')) {
5917
console.log('ERROR: Missing SAML configuration.');
5918
} else {
5919
- const certPath = common.joinPath(obj.parent.datapath, domain.authstrategies.saml.cert);
5919
+ const certPath = obj.common.joinPath(obj.parent.datapath, domain.authstrategies.saml.cert);
5920
var cert = obj.fs.readFileSync(certPath);
5921
if (cert == null) {
5922
console.log('ERROR: Unable to read SAML IdP certificate: ' + domain.authstrategies.saml.cert);
@@ -5999,7 +5999,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
5999
if ((typeof domain.authstrategies.jumpcloud.cert != 'string') || (typeof domain.authstrategies.jumpcloud.idpurl != 'string')) {
6000
console.log('ERROR: Missing JumpCloud SAML configuration.');
6001
} else {
6002
- var cert = obj.fs.readFileSync(common.joinPath(obj.parent.datapath, domain.authstrategies.jumpcloud.cert));
6002
+ var cert = obj.fs.readFileSync(obj.common.joinPath(obj.parent.datapath, domain.authstrategies.jumpcloud.cert));
6003
if (cert == null) {
6004
console.log('ERROR: Unable to read JumpCloud IdP certificate: ' + domain.authstrategies.jumpcloud.cert);
6005
} else {