sdc-cli 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/askpass.js +1 -5
- package/cli.js +5 -2
- package/package.json +1 -1
package/askpass.js
CHANGED
package/cli.js
CHANGED
|
@@ -69,11 +69,11 @@ class CryptCLI {
|
|
|
69
69
|
|
|
70
70
|
async getPassword(options, purpose = 'password') {
|
|
71
71
|
// If password is provided via command line
|
|
72
|
-
if (options.password) {
|
|
72
|
+
if (typeof options.password !== 'undefined') {
|
|
73
73
|
//process.stderr.write(`Warning: Using password from command line is not secure\n`);
|
|
74
74
|
return options.password;
|
|
75
75
|
}
|
|
76
|
-
|
|
76
|
+
|
|
77
77
|
// If password file is specified
|
|
78
78
|
if (options.passwordFile) {
|
|
79
79
|
try {
|
|
@@ -214,6 +214,9 @@ class CryptCLI {
|
|
|
214
214
|
]);
|
|
215
215
|
|
|
216
216
|
const password = await this.getPassword(options, 'password');
|
|
217
|
+
if (password === '') {
|
|
218
|
+
process.stderr.write('Warning: Using empty passwords is dangerous')
|
|
219
|
+
}
|
|
217
220
|
const encrypted = await encrypt_data(answers.inputData, password);
|
|
218
221
|
|
|
219
222
|
if (outputFile) {
|