Comments (4)
Let me follow the lead and try to fix it! Thanks!
from slab.
Here's my profiles:
$ sqlite3 '/Users/akozhokaru/Library/Application Support/1Password 4/Data/OnePassword.sqlite'
SQLite version 3.24.0 2018-06-04 14:10:15
Enter ".help" for usage hints.
sqlite> select id, profile_name from profiles;
2|Family
1|default
And here's some interactive python run:
k.unlock(password, profileName='default')
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/slab-0.1.1-py3.7.egg/onepassword/crypt_util.py", line 170, in opdata1_decrypt_item
File "/usr/local/lib/python3.7/site-packages/cryptography-2.6.1-py3.7-macosx-10.14-x86_64.egg/cryptography/hazmat/primitives/hmac.py", line 67, in verify
ctx.verify(signature)
File "/usr/local/lib/python3.7/site-packages/cryptography-2.6.1-py3.7-macosx-10.14-x86_64.egg/cryptography/hazmat/backends/openssl/hmac.py", line 75, in verify
raise InvalidSignature("Signature did not match digest.")
cryptography.exceptions.InvalidSignature: Signature did not match digest.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/slab-0.1.1-py3.7.egg/slab/slablib.py", line 104, in unlock
File "/usr/local/lib/python3.7/site-packages/slab-0.1.1-py3.7.egg/slab/slablib.py", line 80, in _loadItems
File "/usr/local/lib/python3.7/site-packages/slab-0.1.1-py3.7.egg/slab/slablib.py", line 110, in decrypt_overview
File "/usr/local/lib/python3.7/site-packages/slab-0.1.1-py3.7.egg/onepassword/crypt_util.py", line 172, in opdata1_decrypt_item
ValueError: HMAC did not match for opdata1 record
The issue is that when there's a single vault running, it works fine and once I add another vault, it gets borked.
from slab.
I don't have 1password6 installed anywhere anymore, so it's not something I'm able to work on. I'd happily accept a patch.
I think what's going on is this select statement:
slab/src/python/slab/slablib.py
Line 75 in 0d59055
needs to have the profile added to the where clause, so it will only return items for the unlocked profile, which can be gotten from self.profile['id'] similar to whats done in the _categories() call here:
slab/src/python/slab/slablib.py
Line 43 in 0d59055
I assume the items table also has a profile_id column, but I don't know that for sure.
that should fix the issue.
Again, I don't have 1password6 anymore, nor multiple vaults, so not something I can test.
so someone adventurous(maybe you?) would need to see about a profile_id column on the items table, and then update the SQL query and see if that fixes it. I think it will, if it does, please send a patch!
Also, you will probably need to expose the profileName option to the UI somehow, so you can select which profile to query from.. that's done in the unlock() call:
Line 153 in 0d59055
I'd recommend getting it from a command line option: -p or something, and then passing it into the k.unlock() call.
from slab.
good luck!
from slab.
Related Issues (7)
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 slab.