bitwarden / clients

Bitwarden client apps (web, browser extension, desktop, and cli).
https://bitwarden.com
Other
8.96k stars 1.17k forks source link

CLI asks for master password when using flag --session #10029

Open MaxKeller12 opened 1 month ago

MaxKeller12 commented 1 month ago

Steps To Reproduce

  1. bw config server {your_server}
  2. bw login
  3. enter email address and master password
  4. bw unlock
  5. enter master password
  6. bw list items --session {your_session_key}

Expected Result

a list of items

Actual Result

prompt for master password

Screenshots or Videos

bw unlock --check gives unexpected output

image

Additional Context

I am using version 2024.6.0 due to the bug in 2024.6.1 see https://github.com/bitwarden/clients/issues/9919. Last week, i did not have this issue.

Operating System

Linux

Operating System Version

Ubuntu 22.04.4 LTS

Shell

Bash

Build Version

2024.6.0

Issue Tracking Info

mas-ts commented 1 month ago

I was unable to get the status "unlocked" even after login and export of the session key to my env.

I deleted the files ~/snap/bw/64/Bitwarden\ CLI/data.json and ~/snap/bw/65/Bitwarden\ CLI/data.json and then did a login again. (in my case i login using api key bw login --apikey)

Using version 2024.6.0 (aka 64 in snap)

DonSYS91 commented 1 month ago

Issue for me persist on 2024.7.0 I still can't unlock. I'm doing this via serve. Request:

{
  "password": "REDACTED"
}

Response:

{
    "success": false,
    "message": "Invalid master password."
}

I tried to change master password and it didn't help.

MatthiasGrandl commented 1 month ago

Also facing this. Together with #9646 this basically completely bricks my usage of the CLI :(

dashaun commented 1 month ago

I'm unable to unlock using SNAP 66 or Linux x86 release 2024.7.1, on WSL 2/Ubuntu

Keep getting "Invalid master password."

I think my issue is related.

DonSYS91 commented 1 month ago

I'm unable to unlock using SNAP 66 or Linux x86 release 2024.7.1, on WSL 2/Ubuntu

Keep getting "Invalid master password."

I think my issue is related.

updating to 7.1 solved my issue. double check that you're removing data.json and letting the auth create a new one

hkpD commented 1 month ago

I was unable to get the status "unlocked" even after login and export of the session key to my env.

I deleted the files ~/snap/bw/64/Bitwarden\ CLI/data.json and ~/snap/bw/65/Bitwarden\ CLI/data.json and then did a login again. (in my case i login using api key bw login --apikey)

Using version 2024.6.0 (aka 64 in snap)

Thank you very much. I was having constant issues until I deleted the data.json file that was made when I installed bw CLI through winget