pwsafe / pwsafe

Password Safe - popular secure and convenient password manager
https://pwsafe.org
Other
720 stars 148 forks source link

Password dialog for unlocking doesn't always show (on Linux) #1093

Open atleta opened 7 months ago

atleta commented 7 months ago

I have auto lock enabled and sometimes when I maximize the locked app the unlock dialog just won't show so I'm stuck with an unusable instance that won't react to the mouse or keyboard and has to be killed explicitly. (It seems it doesn't receive the keyboard focus, so even after trying to focus it, e.g. clicking with the mouse, the keyboard events go to other windows.)

image

igor2x commented 7 months ago

Can you select from menu File | Unlock Safe. If yes, then this issue is similar (but not the same as) bug https://github.com/pwsafe/pwsafe/issues/1088

atleta commented 7 months ago

Unfortunately not. When this happens, the app doesn't react to any input. (Including clicking the menubar.)

igor2x commented 7 months ago

Sorry, I have misread your first post. Mouse and keyboard does not respond on click. It looks like password dialog was hidden somewhere behind some other window or similar.

  1. What is your Linux distribution name and version?
  2. What is your Password Safe version? From Help | About
  3. How did you install the program? 3.1 Using version from distribution repository. 3.2. Downloading deb or rpm package from Github or Sourceforge. 3.3. Downloaded source code and compiled it yourself? 3.4 Downloaded manifest file and created and installed flatpak version. 3.5. Running Password Safe inside Wine, Bottles or similar. Which one. 3.6. Something else. What?
  4. What is the setting that triggers auto-lock in your case? I have tested some of the options on Password Safe v1.18.2 on Ubuntu 23.10 and I see from menu Manage | Options | Security icon on left site a) Lock password database after "1" minute. WORKS FINE: It locks database after a minute. b) Lock password database on minimize. DOESN'T WORK: After minimize and click to restore from minimize and database is still unlocked. c) Lock password database on workstation lock. DOESN'T WORK: Pressing Windows+L to lock screen. Login into Ubuntu again and password is still unlocked. d) Do you use some other option. If yes, which one?
  5. Does your problem of unable to unlock the database appears randomly or does it happen something that you suspect it may be the cause of the problem?
  6. What is the reason why you maximize locked window and not unlock it before maximizing?
atleta commented 7 months ago

Sorry, I have misread your first post. Mouse and keyboard does not respond on click. It looks like password dialog was hidden somewhere behind some other window or similar.

I don't know how that could happen given how gnome seems to work: all modal dialogs are strictly centered on the parent window and if you try to move the modal dialogs then the parents move as well. (Pretty annoying behavior BTW, you can't move the modal around to look under it in the parent window if you forgot something.) Also, I have looked around just in case as I knew it could in theory be the problem and minimized every other app and looked on all desktops but it wasn't there. But it still might be that it somehow failed to display properly.

1. What is your Linux distribution name and version?

Ubuntu 22.04

2. What is your Password Safe version? From Help | About

1.16 but I have been experiencing this for years.

3. How did you install the program?
   3.2. Downloading deb or rpm package from Github or Sourceforge.

This.

4. What is the setting that triggers auto-lock in your case? I have tested some of the options on Password Safe v1.18.2 on Ubuntu 23.10 and I see from menu Manage | Options | Security icon on left site

Lock after 7 minutes and workstation lock. But the latter doesn't seem to work here either.

5. Does your problem of unable to unlock the database appears randomly or does it happen something that you suspect it may be the cause of the problem?

Unfortunately, it seems to be random.

6. What is the reason why you maximize locked window and not unlock it before maximizing?

I don't understand this one. When it locks it minimizes itself and then I use the dash (see screenshot below) to access the app. While I do have a tray extension added to gnome it doesn't show up there and even if it would and if it had a menu item to unlock the app it would be a lot more inconvenient (more clicks and smaller click targets) to unlock than by clicking the large icon on the dash. (But, as I said, that is the only option I see anyway.)

image

rafaelx commented 7 months ago

Sounds very similar to #559 and #803 and could already be fixed by #804. Possibly released with version 1.18?!

atleta commented 7 months ago

It doesn't seem to be the case. #804 was merged on May 24th 2022 in a323d840467ac85e4faf738cef38472ed981ff88 , v1.16 is built from ee5e59afa5553964b24fa1976b5a65cb5fcfe821 (tag: 1.16.0) which was committed on Jan 1st 2023. So it already contains that fix. (Actually, v1.15 contained it as well.)

igor2x commented 7 months ago

Now it makes sense to me. The "maximize" action you are writing above is actually not maximize action. Like I understand you minimized program manually or program was automatically minimized and you are restoring from minimize state, you are actually not maximizing the program (like click on maximize button).

I don't know if this is going to help, but usually it is suggested to update any program to latest versions, so we can eliminate the option this may be fixed intentionally or fixed as some side effect. I also assume you have updated Ubuntu with all of the fixed with your release, because it may be OS level problem.

Options to upgrade:

  1. Download Password Safe v1.18.2 deb package manually and install it according to instructions at the bottom of web page.
  2. Install Password Safe v1.18.2 as flatpak. If you are on Ubuntu, you first need to install Flatpak framework.

If there is some OS level problem in you case, then flatpak may fix the problem, because flatpak packages all its dependencies inside Flatpak infrastructure and Password Safe installed as flatpak is completely independent from any OS level libraries. If you install deb package, then Password Safe is installed and it is using OS level packaged libraries.

I don't know, if it bothers you so much, I think it is worth doing some changes and see if it helps.

P.S. I use Password Safe v1.18.2 flatpak version on Ubuntu 23.10 and I don't have any real issue with it.

igor2x commented 7 months ago

I investigated little bit more. GUI is manipulated with libwxbase library. On Ubuntu 22.04 (that you use) there is version libwxbase3.0 and on Ubuntu 23.10 (that I use) is version libwxbase3.2. You can see this from Ubuntu package libraries web site.

I tested this "locking" feature on Ubuntu 23.10 and I can't reproduce the problem. It is possible that there is some libwxbase issue that was fixed in later version.

If this is libwxbase problem, then you may not fix the problem with Password Safe upgrades. But because flatpak uses libwxbase3.2 it may fix your problem.