Passwords: do not silence bw (quiet mode hid the session key)
build-container / build (push) Successful in 5m9s
build-container / build (push) Successful in 5m9s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
af939869a7
commit
70dc75d688
1 file changed
+1
-1
+1
-1
@@ -22,7 +22,7 @@ const ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
||||
const appdata = uid => { const d = path.join(users.dirOf(uid), 'bw'); fs.mkdirSync(d, { recursive: true, mode: 0o700 }); return d; };
|
||||
/** Run `bw` as one person. Secrets travel in the environment only. */
|
||||
function bw(uid, args, { session, password, code, timeout = 45e3 } = {}) {
|
||||
const env = { PATH: process.env.PATH, HOME: process.env.HOME || '/tmp', BITWARDENCLI_APPDATA_DIR: appdata(uid), BW_NOINTERACTION: 'true', BW_QUIET: 'true', NODE_NO_WARNINGS: '1' };
|
||||
const env = { PATH: process.env.PATH, HOME: process.env.HOME || '/tmp', BITWARDENCLI_APPDATA_DIR: appdata(uid), BW_NOINTERACTION: 'true', NODE_NO_WARNINGS: '1' };
|
||||
if (session) env.BW_SESSION = session;
|
||||
if (password != null) env.BW_PASSWORD = password;
|
||||
const run = () => new Promise((resolve, reject) => execFile(BW, args, { env, timeout, maxBuffer: 16e6 }, (err, stdout, stderr) => {
|
||||
|
||||
Reference in new issue
Block a user