-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
putting secrets into logfiles/stdout unencrypted is bad practice #27
Comments
process.config = require('../config'); const Promise = require('bluebird'); const db = require('./db.js'); const parser = new ArgumentParser({ const subparsers = parser.addSubparsers({ const importKeys = subparsers.addParser('import', { addHelp: true }); const signCommand = subparsers.addParser('sign', { addHelp: true }); const verificationParser = subparsers.addParser('verification', { addHelp: true }); const getVerificationCommand = verificationCommands.addParser('get', { addHelp: true }); const setVerificationCommand = verificationCommands.addParser('set', { addHelp: true }); const generateKeysCommand = subparsers.addParser('generate', { addHelp: true }); subparsers.addParser('seed', { const deriveKeyCommand = subparsers.addParser('derive', { addHelp: true }); const validateKey = function(key, type) { if (type === 'xpub' && !xpubRegex.test(key.pub)) { if (type === 'xlm' && !xlmRegex.test(key.pub)) { return true; const saveKeys = co(function *(keys, type) { if (!validTypes.includes(type)) { const keyDocs = keys if (keyDocs.length === 0) { console.log( try {
} catch (e) { const handleImportKeys = co(function *(args) { if (path === null) { const keys = JSON.parse(fs.readFileSync(path, { encoding: 'utf8' })); yield saveKeys(keys, type); const handleDeriveKey = function(args) { const handleGenerateKeys = function(args) { for (let i = args.start; i < args.start + args.n; i++) {
} console.log( const handleGenerateHDSeed = function() { console.log(crypto.randomBytes(XLM_SEED_LENGTH).toString('hex')); const handleVerificationGet = co(function *(args) { const key = yield WalletKey.findOne({ pub }).lean(); if (key === null) { if (_.isUndefined(key.verificationInfo)) { // if there are multiple lines, this aligns each line under the first line console.log(); const handleVerificationSet = co(function *(args) { if (key === null) { key.set('verificationInfo', args.info.join(' ')); try { const handleVerification = co(function *(args) { const run = co(function *(testArgs) { switch (args.cmd) { db.connection.close(); // For admin script and unit testing of functions |
key-recovery-service-v2/app/admin.js
Line 277 in 9502236
The text was updated successfully, but these errors were encountered: