Giter VIP home page Giter VIP logo

Comments (4)

korjik avatar korjik commented on June 25, 2024 1

Let me follow the lead and try to fix it! Thanks!

from slab.

korjik avatar korjik commented on June 25, 2024

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.

peacetara avatar peacetara commented on June 25, 2024

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:

q = """select distinct i.id, c.singular_name as category, i.overview_data from items i, categories c where c.id = i.category_id and not i.trashed order by i.id;"""

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:

q = "select id, singular_name from categories where profile_id=?"

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:

k.unlock(password, filter='sudolikeaboss')

I'd recommend getting it from a command line option: -p or something, and then passing it into the k.unlock() call.

from slab.

peacetara avatar peacetara commented on June 25, 2024

good luck!

from slab.

Related Issues (7)

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.