Open Bug 1907443 Opened 4 months ago Updated 4 months ago

Exchange autodiscover authentication failures no longer handled correctly [regression]

Categories

(Thunderbird :: Account Manager, defect)

Thunderbird 118
defect

Tracking

(thunderbird_esr115? affected, thunderbird_esr128? affected, thunderbird128 affected, thunderbird129 affected, thunderbird130 affected)

ASSIGNED
Tracking Status
thunderbird_esr115 ? affected
thunderbird_esr128 ? affected
thunderbird128 --- affected
thunderbird129 --- affected
thunderbird130 --- affected

People

(Reporter: neil, Assigned: neil)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files, 1 obsolete file)

As of bug 1397646, FetchHTTP can't reliably use statusText any more as a means of detecting network failures, so if the autodiscover server doesn't provide any status text (e.g. because it uses HTTP/2), FetchHTTP now misidentifies these as network failures.

Furthermore, the code path changes caused by bug 1859656 prevent the authentication error from interrupting the autodiscover process like it used to.

Attached patch Proposed patch (obsolete) — Splinter Review
Assignee: nobody → neil
Attachment #9412366 - Flags: review?(ben.bucksch)
Attachment #9412366 - Flags: review?(ben.bucksch) → review+

Thanks for the good patch. The new code is easier to read and more reliable.

Regressed by: 1397646, 1859656
Summary: Exchange autodiscover authentication failures no longer handled correctly → Exchange autodiscover authentication failures no longer handled correctly [regression]

Just a suggestion (not required): Should we use an exception class ExchangeUsernameException like in bug 1907130, to be more explicit about the code path?

Attachment #9413036 - Flags: review?(ben.bucksch)
Attachment #9413049 - Flags: review?(ben.bucksch)
Attachment #9412366 - Attachment is obsolete: true
Attachment #9413049 - Flags: review?(ben.bucksch) → review+

Comment on attachment 9413036 [details] [diff] [review]
Addressed review comments

r=BenB

Attachment #9413036 - Flags: review?(ben.bucksch) → review+

The problem is worse in TB 115 and the fix needed even more urgently in TB 115 than on trunk. See bug 1907130.

Thanks for the report and the suggested patches.
Could you please upload them to Phabricator? We don't handle bugzilla patches anymore.

I'm curious, how is this issue present in 115 if the regressors landed in 118 and 126?
Would it be possible to identify only a single regressor? That would be more accurate.

(In reply to Alessandro Castellani from comment #8)

I'm curious, how is this issue present in 115 if the regressors landed in 118 and 126?

Bug 1907130 is only present in 115, but the fix happens to be equivalent to a backport of this fix.

Good question. It's complicated, so I wanted to spare you the details. Happy to explain.

The 115 problem was a race condition which has always been present, but was made very apparent and common only last year, when Office365 disabled Basic auth, which made certain HTTP calls always fail with a 401 (and apparently fail very fast, faster than the ISPDB responds) and triggered this case far more often.

In TB 128, that race does not actually happen, by coincidence, because the new OAuth2 prompt during AutoDiscover waits for user input and blocked the racing function. Nonetheless, we submit the code change for trunk as well, because a) the fix makes the code both more reliable and b) more readable, and c) to allow easier testing of the change on trunk.

In TB 128, there is another regression caused by bug 1397646, which changed the implementation so that XMLHttpRequest.statusText now returns nothing for HTTP2 calls, and this change caused our code to fail. This problem is fixed only in the TB 128 patch and does not apply to TB 115, so we left that part out of the TB 115 patch.

Thanks for the explanation.
I'm gonna mark Bug 1907130 as duplicate of this one since they're basically tackling the same thing.

Duplicate of this bug: 1907130
Comment on attachment 9413036 [details] [diff] [review] Addressed review comments Review of attachment 9413036 [details] [diff] [review]: ----------------------------------------------------------------- ::: mail/components/accountcreation/content/accountSetup.js @@ +829,5 @@ > }, > > + _showExchangeUsername() { > + this.onStartOver(); > + this.stopLoadingState(); // clears status message (Like :aleca wrote, please submit using phabricator). Anyway, these two lines seems not to belong in a function that should show the username.
Status: NEW → ASSIGNED

these two lines seems not to belong in a function that should show the username.

They belong there where they are, because they set the dialog in the state to show the username, be consistent with the state, and re-run the autoconfig after that. Without these lines, the dialog display is in an inconsistant state. Every caller who calls this showExchangeUsername() function must call these lines.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: