Skip to content
Snippets Groups Projects
Commit 64bf5752 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

Fix: --salt & --passwd parameters override were not correctly taken into account

parent 32ce965d
Branches
Tags
No related merge requests found
...@@ -127,7 +127,8 @@ function Server (dbConf, overrideConf) { ...@@ -127,7 +127,8 @@ function Server (dbConf, overrideConf) {
logger.debug('Loading crypto functions...'); logger.debug('Loading crypto functions...');
// Extract key pair // Extract key pair
let keyPair = null; let keyPair = null;
if (!overrideConf.salt && !overrideConf.passwd && that.conf.pair) { const keypairOverriden = overrideConf && (overrideConf.salt || overrideConf.passwd);
if (!keypairOverriden && that.conf.pair) {
keyPair = keyring.Key(that.conf.pair.pub, that.conf.pair.sec); keyPair = keyring.Key(that.conf.pair.pub, that.conf.pair.sec);
} }
else if (that.conf.passwd || that.conf.salt) { else if (that.conf.passwd || that.conf.salt) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment