kkapsner / keepassxc-mail

MailExtension to talk to keepassxc
GNU General Public License v3.0
60 stars 5 forks source link

First password prompt not handled #83

Open kkapsner opened 1 year ago

kkapsner commented 1 year ago

The first primary password prompt and (sometimes) the normal first prompt are not handled by keepassxc-mail.

Expected Behaviour

All passwords prompts are handled.

Current Behaviour

The first primary password prompt is never handled. If no primary password is set the first normal password prompt is sometimes (depending on a racing condition)

Possible Solution

For the "normal" prompts Thunderbird could be set into offline upon shutdown and then set online when keepassxc-mail is ready. The primary password prompt problem has to be handled by Thunderbird code.

Steps to Reproduce (for bugs)

  1. create a fresh Thunderbird profile
  2. set a primary password
  3. install keepassxc-mail
  4. restart Thunderbird -> the first primary password prompt is not handled

Context

Always reproducible with the master password. Without it's dependent on the amount of installed extensions and the specific accounts.

Your Environment

Issues mentioning this:

kkapsner commented 1 year ago

Todo:

kkapsner commented 1 year ago

Remaining:

kkapsner commented 1 year ago

@mdonz and @johannes-hafner: please try keepassxc-mail-1.5.1.zip

johannes-hafner commented 1 year ago

Seems to be working. I installed that version, opened and closed thunderbird a few times and so far, the issue did not occur again. I'll post an update in case the issue reappears, otherwise, consider this solved. Thank you for looking into it and providing a fix so soon!

johannes-hafner commented 1 year ago

Ok, after a bit more testing, I am not sure wether IMAP connections are established at all after startup. I have KeePass set up to prompt me if a password is requested using native messaging, and I do not get one after stating thunderbird.

I also tested if I receive new emails after startup and the answer is no - I only get them when I click the UI button to check for new messages.

So apparently, after swichting thunderbird back to online mode, IMAP accounts are not connected immediately.

mdonz commented 1 year ago

Hm, strong side effects here. My CalDav based calendars (three) are not accessible, each showing an exclamation mark in the calendar pane. They are usable again if I untick the "Enable this calendar" and then tick it again but will end in the same unusable state after a next Thunderbird start. I has to revert back to the previous Keepassxc version (1.4.1 I am using, installed this on top of 1.5.1 ) but unfortunately the Caldav calendars are not not working at all. Will try to uninstall Keepassxc and start fresh with 1.4.1 and hope to get calendars working again.

mdonz commented 1 year ago

After uninstall/re-install, Thunderbird is now in offline mode when starting up so there is some of the functionality left over from the Keepassxc 1.5.1. installation as it look like. This impacts all Caldav calendars badly. I hope to find that setting or otherwise appreciate some advice here where to disable going into offline mode when closing Thunderbird.

mdonz commented 1 year ago

Searched for offline mode settings and reset back to default. Have my previous behaviour for Keepassxc 1.4.1 back as it was before. The Caldav calendars did not handle the offline mode well hence 1.5.1 would not work for me.

kkapsner commented 1 year ago

Thanks for testing. It's the preference "offline.startup_state" that I tried to utilize.

So I have some things to figure out:

johannes-hafner commented 1 year ago

CalDav calenders actually do work for me, though they don't sync after startup.

yoshi-12321 commented 11 months ago

I seem to have the same Issue... tried to work around with autotype but it does not work for me since KeePassXC is not regonizing the window title of the popup promt window (to enter master PW).... once opened the connection is fine.

kkapsner commented 4 months ago

I did not have time to work on this for a long time... but my schedule should allow some progress on it soon hopefully.