firecat53 / keepmenu

Dmenu/Rofi frontend for Keepass databases
GNU General Public License v3.0
204 stars 32 forks source link

trying to use entries with "otp" field crashes keepmenu #122

Closed bdeshi closed 2 years ago

bdeshi commented 2 years ago
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/keepmenu/__main__.py", line 171, in main
    manager = client()
  File "/usr/lib/python3.10/site-packages/keepmenu/__main__.py", line 76, in client
    mgr.connect()
  File "/usr/lib/python3.10/multiprocessing/managers.py", line 531, in connect
    conn = Client(self._address, authkey=self._authkey)
  File "/usr/lib/python3.10/multiprocessing/connection.py", line 507, in Client
    c = SocketClient(address)
  File "/usr/lib/python3.10/multiprocessing/connection.py", line 635, in SocketClient
    s.connect(address)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.10/site-packages/keepmenu/keepmenu.py", line 305, in run
    self.dmenu_run()
  File "/usr/lib/python3.10/site-packages/keepmenu/keepmenu.py", line 378, in dmenu_run
    func()
  File "/usr/lib/python3.10/site-packages/keepmenu/keepmenu.py", line 404, in menu_view_type_individual_entries
    text = view_entry(entry)
  File "/usr/lib/python3.10/site-packages/keepmenu/view.py", line 57, in view_entry
    "TOTP: ******" if kp_entry.get_custom_property("otp") else "TOTP: None",
  File "/usr/lib/python3.10/site-packages/pykeepass/entry.py", line 255, in get_custom_property
    assert key not in reserved_keys, '{} is a reserved key'.format(key)
AssertionError: otp is a reserved key
keepmenu 685757c
pykeepass 4.0.3
pynput 1.7.6
python 3.10.5
os Archlinux
menu rofi
Dantali0n commented 2 years ago

Almost certainly caused by recent pykeepass update: https://github.com/libkeepass/pykeepass/commit/199cf0ebfa8bfd3dd3e79dfd56e69f18a9da8428

Dantali0n commented 2 years ago

Hello @firecat53 do you have time to look at this in a reasonable timeframe or would you like some help with this?