Comments (3)
I should add that I'm running a self-hosted bitwarden-rs as the backend, no idea if it's mangling something.
from rbw.
I managed a quick and dirty way to dump the json and found the culprit:
"PasswordHistory":[{"LastUsedDate":"2021-03-31T19:30:06.936Z","Password":null}]
I can find this empty entry in the bitwarden desktop app:
Note that I suspect that this was added by rbw itself when I used rbw edit
on an entry without a password set, but I could be wrong since I can't reproduce it as long as my rbw is out of order.
So I managed to work around the issue using the following patch:
diff --git a/src/api.rs b/src/api.rs
index 99e12fd..ac35306 100644
--- a/src/api.rs
+++ b/src/api.rs
@@ -254,7 +254,7 @@ impl SyncResCipher {
.iter()
.map(|entry| crate::db::HistoryEntry {
last_used_date: entry.last_used_date.clone(),
- password: entry.password.clone(),
+ password: entry.password.clone().unwrap_or_else(String::new),
})
.collect()
} else {
@@ -459,7 +459,7 @@ struct SyncResPasswordHistory {
#[serde(rename = "LastUsedDate")]
last_used_date: String,
#[serde(rename = "Password")]
- password: String,
+ password: Option<String>,
}
This way the sync
command completes, but now I hit another problem:
rbw list: failed to decrypt: failed to parse encrypted secret: invalid cipherstring: couldn't find type
from rbw.
Ah it's actually the same issue: since above I replace the NULL password with an empty string, it then fails when it attempts to decrypt it.
So instead I'm going to filter out entries with no password.
from rbw.
Related Issues (20)
- How to debug failed logins? HOT 7
- Pinentry script not working with passwords containing spaces
- Pinentry script not working with 2fa codes
- Add Pinentry script auto setup
- Username or Password are incorrect. Try Again HOT 31
- Unable to `get` entries containing colons in the name HOT 1
- Decryption failed on long Ciphertexts HOT 2
- UUIDs for `edit`, `remove`, and `history` doesn't work
- API endpoint `/accounts/prelogin` to be removed from the official Bitwarden server HOT 3
- new version of 'rbw' struggles with lower case ([a-z]) TOTP secrets and ones with padding - trailing equal signs ('=') HOT 1
- Failed decrypt if only organizations used HOT 1
- request: add --sort-by option to "list" command HOT 1
- SSH-agent protocol HOT 1
- `rbw gen-completions ${shell}` fails for debug build HOT 1
- [question] usage in skripting for AWX Ansible?
- failed to decrypt notes: failed to decrypt: failed to decrypt encrypted secret: invalid mac HOT 14
- rbw in script pass passowrd HOT 2
- cannot sync HOT 3
- does this support parallel execution with the same session?
- cardholder_name is null
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rbw.