GithubHelp home page GithubHelp logo

Comments (10)

kspearrin avatar kspearrin commented on August 26, 2024

Try using double quotes?

bw unlock "password with spaces"

from cli.

w1ngnutt avatar w1ngnutt commented on August 26, 2024

I've tried both with single quotes and with double quotes. I originally noticed the issue when I couldn't get the bitwarden-rofi project to work: https://github.com/mattydebie/bitwarden-rofi

from cli.

kspearrin avatar kspearrin commented on August 26, 2024

I just tested both of the following:

bw unlock "password with spaces"
bw unlock 'password with spaces'

and they seemed to work without issue. Windows 10.

from cli.

w1ngnutt avatar w1ngnutt commented on August 26, 2024

from cli.

kspearrin avatar kspearrin commented on August 26, 2024

Note that this was using gitbash window on Windows 10, which should behave the same as a Linux bash terminal.

from cli.

Mange avatar Mange commented on August 26, 2024

I can confirm the same issue. I can copy my master password and it is accepted when I enter it in the interactive prompt, but doing bw unlock "<paste>" will not accept it (I've of course also tried entering it manually).

› bw --version
1.6.0
› uname -a
Linux morbidus 4.19.12-arch1-1-ARCH #1 SMP PREEMPT Fri Dec 21 13:56:54 UTC 2018 x86_64 GNU/Linux
› $SHELL --version
zsh 5.6.2 (x86_64-pc-linux-gnu)

from cli.

Mange avatar Mange commented on August 26, 2024

I changed the source code for my command to always prompt for the master password and to print out a debug representation of the input password. This shows the problem nicely:

› bw unlock "this is a test"
'this'
? Master password: [hidden]
'this is a test'
Invalid master password.

Code change:

		var util = require("util"); //NEW
		console.log(util.inspect(password)); // NEW
            //if (password == null || password === '') {
            if (true) { // NEW
                const answer = yield inquirer["createPromptModule"]({ output: process.stderr })({
                    type: 'password',
                    name: 'password',
                    message: 'Master password:',
                });
                password = answer.password;
		console.log(util.inspect(password)); // NEW

from cli.

Mange avatar Mange commented on August 26, 2024

I found the bug: It's in the shell wrapper script (/usr/bin/bw in my case).

#!/bin/sh
node /usr/lib/bitwarden-cli/bw.js $@

Note that the arguments are passed on with whitespace splitting enabled. Making it quote the arguments made everything work for me.

#!/bin/sh
node /usr/lib/bitwarden-cli/bw.js "$@"

from cli.

w1ngnutt avatar w1ngnutt commented on August 26, 2024

The above change fixes the issue for me as well.

from cli.

w1ngnutt avatar w1ngnutt commented on August 26, 2024

This appears to be an issue with the shell script included by the package maintainer, not this project. I'll report there.

https://aur.archlinux.org/packages/bitwarden-cli/

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.