firecat53 / keepmenu

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

Hide protected custom properties #131

Closed vaygr closed 1 year ago

vaygr commented 2 years ago

Right now only multi-line custom properties are not explicitly displayed when you pull up an entry.

This change hides "protected" properties. In a way it mimics what the Reveal button does in KeePassXC.

This depends on the latest addition in pykeepass @ https://github.com/libkeepass/pykeepass/pull/322, so it shouldn't be merged/released until the next release of pykeepass.

Also keep in mind that protected attributes are NOOP in pykeepass as all entries get decrypted at once on unlocking the database contrary to the RFC.

firecat53 commented 2 years ago

I'll take a look when they tag the next version, which should contain that PR. If you don't hear from me within a week or so after that, ping me!

firecat53 commented 1 year ago

Looks like pykeepass still hasn't tagged a new version with the fix needed for this PR. Just checking in.

vaygr commented 1 year ago

They finally did: https://github.com/libkeepass/pykeepass/tags

vaygr commented 1 year ago

@firecat53 this is probably good to merge given 2 recent releases by upstream.

firecat53 commented 1 year ago

I think maybe adding a check if the is_custom_property_protected attribute exists before actually hiding the attribute might be appropriate. People using older versions of pykeepass (e.g. NixOS unstable is still on 4.0.3) will otherwise get a crash on AttributeError: 'Entry' object has no attribute 'is_custom_property_protected'. Thoughts?

vaygr commented 1 year ago

@firecat53 great point. Fixed in the last commit.