Skip to content
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

Not able to unlock session #84

Open
vargn opened this issue Dec 17, 2023 · 3 comments
Open

Not able to unlock session #84

vargn opened this issue Dec 17, 2023 · 3 comments

Comments

@vargn
Copy link

vargn commented Dec 17, 2023

Since the latest bitwarden-cli 2023.12.0-1 Arch package, I have not been able to unlock my BW session using my master password. Downgrading to bitwarden-cli 2023.10.0-1 resolved the issue.

@oleasteo
Copy link

The issue seems to be that the newer bitwarden-cli for some reason now outputs

mac failed.
SOME_HASH

instead of just the hash during unlock, as expected by bitwarden-rofi.

Temporary workaround: Add | grep -vF 'mac failed.' after bw --raw --nointeraction unlock "$mpw" 2>&1 (line 58 in /usr/bin/bwmenu, arch linux).
It should look like this:

ask_password() {
  rm $CACHE_FILE
  mpw=$(printf '' | rofi -dmenu -p "Master Password" -password -l 0 ${ROFI_OPTIONS[@]}) || exit $?
  if ! out="$(bw --raw --nointeraction unlock "$mpw" 2>&1 | grep -vF 'mac failed.')"; then
    exit_error 1 "Could not unlock vault: $out"
  fi
  echo "$out"
}

@vargn
Copy link
Author

vargn commented Feb 1, 2024

The issue seems to be that the newer bitwarden-cli for some reason now outputs

mac failed.
SOME_HASH

instead of just the hash during unlock, as expected by bitwarden-rofi.

Temporary workaround: Add | grep -vF 'mac failed.' after bw --raw --nointeraction unlock "$mpw" 2>&1 (line 58 in /usr/bin/bwmenu, arch linux). It should look like this:

ask_password() {
  rm $CACHE_FILE
  mpw=$(printf '' | rofi -dmenu -p "Master Password" -password -l 0 ${ROFI_OPTIONS[@]}) || exit $?
  if ! out="$(bw --raw --nointeraction unlock "$mpw" 2>&1 | grep -vF 'mac failed.')"; then
    exit_error 1 "Could not unlock vault: $out"
  fi
  echo "$out"
}

Can confirm this is working. Thank you!

@andyhunne
Copy link

The issue seems to be that the newer bitwarden-cli for some reason now outputs

mac failed.
SOME_HASH

instead of just the hash during unlock, as expected by bitwarden-rofi.

Temporary workaround: Add | grep -vF 'mac failed.' after bw --raw --nointeraction unlock "$mpw" 2>&1 (line 58 in /usr/bin/bwmenu, arch linux). It should look like this:

ask_password() {
  rm $CACHE_FILE
  mpw=$(printf '' | rofi -dmenu -p "Master Password" -password -l 0 ${ROFI_OPTIONS[@]}) || exit $?
  if ! out="$(bw --raw --nointeraction unlock "$mpw" 2>&1 | grep -vF 'mac failed.')"; then
    exit_error 1 "Could not unlock vault: $out"
  fi
  echo "$out"
}

Sorted me out too. Thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants