exchangecalendar icon indicating copy to clipboard operation
exchangecalendar copied to clipboard

double password prompt

Open fanto666 opened this issue 8 years ago • 8 comments

I use EWS with SeaMonkey 2.40 (combines firefox and thunderbird), set to ask for password on startup. When EWS is enabled, I get two password prompts on startup. last tried with 3.9.0-beta1

fanto666 avatar Oct 24 '16 06:10 fanto666

Same here: Thunderbird 45.4.0 EWS 3.9.0-beta1 Problem was always present, also in earlier versions if the master password is set.

Bruzzlee avatar Oct 28 '16 09:10 Bruzzlee

Hello,

are both requests for the calendar? I also have two request, one for E-Mail from the Exchange-Server and one for the calendar.

Mechtilde

Am 24.10.2016 um 08:50 schrieb fanto666:

I use EWS with SeaMonkey 2.40 (combines firefox and thunderbird), set to ask for password on startup. When EWS is enabled, I get two password prompts on startup. last tried with 3.9.0-beta1

Mechtilde Stehmann

Apache OpenOffice.org

Freie Office Suite für Linux, MacOSX, Windows

Debian

Loook, calender-exchange-provider, libreoffice-canzeley-client

PGP encryption welcome

Key-ID 0x141AAD7F

Mechtilde avatar Oct 29 '16 07:10 Mechtilde

I can't differentiate the requests but I think the first request is only for the EWS and the second (behind the first one) is for the rest. Because:

  • I only use EWS for calendar
  • When I deactivate the calendar using EWS, the request won't show up.
  • The other calendars (CalDav) services, which also need authentication, do not raise a second master password request

Bruzzlee avatar Oct 30 '16 23:10 Bruzzlee

On my side I've these requests to unlock master password:

  • One from thunderbird to access my IMAP account (I can distinguish it because the prompt title don't contain "EWS" word)
  • Multiple from EWS (in fact, I think one by calendar and address book configured)

When I give my password on the first one, Thunderbird can receive mails, but EWS still wait I fill all other prompts to continue.

I know that EWS is waiting, because, when I filled every other prompts (around 4 I think), Thunderbird begins to freeze and the current syncing job counter begins to decrease.

If I've well understood the code from the extension: this extension needs to have its own password cache to avoid to ask password at each exchange server request (which have to be ran often, because we want to be synced with the exchange server). The interface used to do this seems to be the mivExchangeAuthPrompt2.

Currently this interface inherits from the nsIAuthPrompt2 Mozilla interface and override its methods (especially asyncPromptAuth and promptAuth). I think our issues comes from these overrides.

I don't know enough javascript, but I think a better solution will be something like this:

When we have to send a request to the Exchange server:

  1. we ask password from a singleton like mivExchangePasswords with a method like getPassword()
  2. This method will first check in a dictionary of cached passwords (identifier will be the Exchange URL with user inside it)
  3. If the dictionary doesn't contain the password for the account, the next step is to call the Mozilla nsIAuthPrompt2.asyncPromptAuth.
    1. on successful callback, the method will fill its dictionary and return the password
    2. on canceled callback, we have to decide what to do
  4. If the dictionary contains the password, the singleton return directly the password contained in the cache

But as I don't know enough javascript, I can't say if it is feasible and I'm not sure if I've well understood the mivExchangeAuthPrompt2 code.

EDIT: Well, I've just seen that nsIAuthPrompt will simply create the cache if we use it with SAVE_PASSWORD_FOR_SESSION, so I have to read more documentation :)

Trim avatar Nov 01 '16 19:11 Trim

Well, I've just seen that nsIAuthPrompt will simply create the cache if we use it with SAVE_PASSWORD_FOR_SESSION, so I have to read more documentation :)

I've was able to call nsIAuthPrompt interface and, currently, the SAVE_PASSWORD_FOR_SESSION mode is not implemented, so we'll have to first solution I have draft with either the SAVE_PASSWORD_NEVER mode from nsIAuthPrompt or use the nsIAuthPrompt2 without redefining its functions to keep the Mozilla's prompt queue management.

To do this solution, I've learned that a "singleton" as I've written inside it is a XPCOM interface which implements a service.

Trim avatar Nov 08 '16 22:11 Trim

Please enable NTLMv1 in preference->Exchangecalendar->Others

bavincen avatar Jan 12 '17 07:01 bavincen

enable NTLMv1 does not solve the "double password issue" At least in my case.

Bruzzlee avatar Jan 12 '17 10:01 Bruzzlee

Please try creating calendar again. I found no issue in add-on.

If still exist. please post log

Regards

bavincen avatar Jan 14 '17 10:01 bavincen