Rookiestyle / KeePassOTP

Add OTP support (two factor authentication) to KeePass
GNU General Public License v3.0
405 stars 29 forks source link

KeePassOTP gets in conflict with KeeTrayTOTP-Plugin #135

Closed RichardBeisser closed 1 year ago

RichardBeisser commented 1 year ago

Hello, i am using KeePass with Mono on a rPi4, Raspian Bullseye 32bit.

When I use the copy-function in KP, for example Strg+b for username, System freeze immediately. It's the same when i make a double-click with mouse on a value.

Running KP only with KeePassOTP-Plugin --> everything ok Running KP only with KeeTrayTOTP-Plugin --> everything ok

Running KP with KeePassOTP-Plugin an KeeTrayTOTP-Plugin --> system is very slow

Keepass 2.53.1 KeePassOTP V 1.6.4 KeeTrayTOTP 0.108

Because there was no Update for KeeTrayTOTP for a long time (2020) and both plugins lived in harmony in the past, i suppose that KeePassOTP resulted the conflict in the last time.

Rookiestyle commented 1 year ago

I don't have a Raspberry and I can't reproduce this on my Ubuntu VM.

The latest KeePassOTP update was in February, the latest KeePass update was in January. Since when do you face this issue and can you try using an older version, e. g. KeePassOTP 1.6.2 or 1.6?

May I ask why you use KeePassOTP and KeeTrayTotp?

RichardBeisser commented 1 year ago

The latest KeePassOTP update was in February, the latest KeePass update was in January. Since when do you face this issue

the big change came with Update in Feb. But also before, the dual use of both plugins slowed down my system..

May I ask why you use KeePassOTP and KeeTrayTotp?

Well, KeeTrayTotp has a function in the gui to specify NTP-Servers. But I dont know when it is neccessary or a goog idea to use that feature.

Of course I could use only KeePassOTP, but I now have mixed up both Keywords {KPOTP} and {TOTP} all over my KP-Database. Can I search and replace {TOTP} by {KPOTP} over all entries?

Thanks.

Rookiestyle commented 1 year ago

Of course I could use only KeePassOTP, but I now have mixed up both Keywords {KPOTP} and {TOTP} all over my KP-Database. Can I search and replace {TOTP} by {KPOTP} over all entries?

No, this way won't work. You can have KeePassOTP migrate other plugins' data instead. https://github.com/Rookiestyle/KeePassOTP/wiki/Migrate-to--and-from-other-plugins

As always: better be safe than sorry and create a backup before migrating. Although tested successfully, you never know... ;)

Well, KeeTrayTotp has a function in the gui to specify NTP-Servers. But I dont know when it is neccessary or a goog idea to use that feature.

Same reasons as explained here: Well, KeeTrayTotp has a function in the gui to specify NTP-Servers. But I dont know when it is neccessary or a goog idea to use that feature. In general: Not required unless there is a site that rejects your OTP

But also before, the dual use of both plugins slowed down my system..

Just guessing... Both plugins have an option to show the current OTP as additional column in the entry list. Do you have this active for both plugins? If yes, does deactiving this improve the situation?

RichardBeisser commented 1 year ago

Of course I could use only KeePassOTP, but I now have mixed up both Keywords {KPOTP} and {TOTP} all over my KP-Database. Can I search and replace {TOTP} by {KPOTP} over all entries?

No, this way won't work. You can have KeePassOTP migrate other plugins' data instead. https://github.com/Rookiestyle/KeePassOTP/wiki/Migrate-to--and-from-other-plugins

My fault, i meant that I mixed both placeholders in usage of autotyping The Problem is described here, and you answered it there too: https://sourceforge.net/p/keepass/discussion/329220/thread/5d3d91c0da/?limit=25#eea9

Just guessing... Both plugins have an option to show the current OTP as additional column in the entry list. Do you have this active for both plugins? If yes, does deactiving this improve the situation?

yes, you are guessing right, I have enabled the additional columns for both plugins I will test to deactivate the columns in the next days. Why do you think that the columns are the problem? Should I deactivate additional columns only for KeeTrayTOTP, or both KeeTrayTOTP and KeePassOTP?

By the way, I have the problem with slowing down system only with KP running on Linux with momo. With windows, I noticed no problems. Do you have an explanation for this?

Rookiestyle commented 1 year ago

Those columns are provided by the respective plugins and the values shwon are updated every second. KeePassOTP updates only the KeePassOTP column whereas KeeTrayTOTP updates complete entrylist. KeeTrayTOTP's appraoch results in recalculation and painting/updating the screen for all columns of all entries - this is pretty "expensive". cf. KeeTrayTOTP/KeeTrayTOTP#27, especially the author's comment

Let's assume your entrylist shows 10 entries with OTP active - 5 x KeePassOTP, 5 x KeeTrayTOTP Every second, 15 OTP values will be calculated and the entire KeePass screen will be redrawn: KeePassOTP will calculate the 5 KeePassOTP values KeeTrayTOTP will trigger calculation of 5 KeePassOTP values and 5 KeeTrayTOTP values plus updating and repainting the entire screen that you see

Running this on Mono obviously does not improve this since this is one more abstraction layer for translating all that to a format that Linux can understand. This that takes time, especially updating the screen. If both plugins are active, there is even more screen updates and those might even be conflicting with each other.

RichardBeisser commented 1 year ago

now I found some time to test what you have said. Your were absolutely right. With every column less, KP run faster. When I remove KeeTrayTOTP-Plugin, it gets also faster.

Rookiestyle commented 1 year ago

Thanks for coming back with that feedback. I'll close this one.