Remove XPCOM registrations for HTTP authenticators and auth modules

RESOLVED FIXED in Firefox 65

Status

()

enhancement
P3
normal
RESOLVED FIXED
9 months ago
9 months ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

(Depends on 1 bug, Blocks 1 bug)

unspecified
mozilla65
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox65 fixed)

Details

(Whiteboard: [necko-triaged])

Attachments

(3 attachments)

No description provided.
Blocks: 1477576
Depends on D10026
Please cc me next time on http authentication bugs.  Thanks.
Priority: -- → P3
Whiteboard: [necko-triaged]
...Backed out for mingwclang bustages on include/sspi.h
There were also bustages on Unified_cpp_extensions_auth0.obj 
Log link: https://treeherder.mozilla.org/logviewer.html#?job_id=208383997&repo=autoland&lineNumber=16392
(In reply to Honza Bambas (:mayhemer) from comment #4)
> Please cc me next time on http authentication bugs.  Thanks.

Sure, will do.
Flags: needinfo?(ehsan)
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b403c3c786ee
Part 1: Remove XPCOM component registrations for HTTP authenticator classes r=valentin
https://hg.mozilla.org/integration/autoland/rev/07648e9d8400
Part 2: Remove XPCOM component registrations for auth module classes r=valentin
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/32a581482291
Part 1: Remove XPCOM component registrations for HTTP authenticator classes r=valentin
https://hg.mozilla.org/integration/autoland/rev/b3bf57d996a7
Part 2: Remove XPCOM component registrations for auth module classes r=valentin
https://hg.mozilla.org/integration/autoland/rev/6b821f5b12ae
Part 3: Remove nsAuthModule r=valentin
https://hg.mozilla.org/mozilla-central/rev/32a581482291
https://hg.mozilla.org/mozilla-central/rev/b3bf57d996a7
https://hg.mozilla.org/mozilla-central/rev/6b821f5b12ae
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Depends on: 1503201
Depends on: 1503350
Backed out for causing multiple crashes - Bug 1503201 

Backout: https://hg.mozilla.org/mozilla-central/rev/c2b537178ae9cb4ee0c8afbc1504f97159a7aed5
Status: RESOLVED → REOPENED
Flags: needinfo?(ehsan)
Resolution: FIXED → ---
Target Milestone: mozilla65 → ---
The crash in bug 1503201 can be reproduced on https://jigsaw.w3.org/HTTP/Digest/ after entering "guest" as both user name and password.
Flags: needinfo?(ehsan)
A better place to reproduce the bug is actually https://www.xda-developers.com/huawei-gopro-quik/.

On that page we end up getting a resource with the following string as the auth challenge: "Bearer realm=\"XDA\"".  This gives us the "bearer" authType, which isn't a real auth type.  Here, we fail with the NS_ERROR_SERVICE_NOT_FOUND error code.

*But*, and here is the source of our bug, NS_ERROR_SERVICE_NOT_FOUND is _not_ an error code, as it turns out, it is a _success_ code: https://searchfox.org/mozilla-central/rev/fc3d974254660b34638b2af9d5431618b191b233/xpcom/base/ErrorList.py#183

It seems to be used for the case where the XPCOM factory has returned a success error code, without returning an object: https://searchfox.org/mozilla-central/rev/fc3d974254660b34638b2af9d5431618b191b233/xpcom/components/nsComponentManager.cpp#1048.  As a result, this NS_SUCCEEDED check <https://searchfox.org/mozilla-central/rev/fc3d974254660b34638b2af9d5431618b191b233/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp#588> would pass and we'd fall into this branch here where |auth| would be null which would cause the crash: <https://searchfox.org/mozilla-central/rev/fc3d974254660b34638b2af9d5431618b191b233/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp#612>.

Passing the correct XPCOM error code which is NS_ERROR_FACTORY_NOT_REGISTERED fixes the crash.
See Also: → 497136
(In reply to :Ehsan Akhgari from comment #14)
> *But*, and here is the source of our bug, NS_ERROR_SERVICE_NOT_FOUND is
> _not_ an error code,

It would really not come through my mind to look at that error code declaration :D  Good to know.
NS_ERROR_SERVICE_NOT_FOUND has been removed by bug 497136.
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/53675535f504
Part 1: Remove XPCOM component registrations for HTTP authenticator classes r=valentin
https://hg.mozilla.org/integration/autoland/rev/5662f3757fb4
Part 2: Remove XPCOM component registrations for auth module classes r=valentin
https://hg.mozilla.org/integration/autoland/rev/32c4433496ab
Part 3: Remove nsAuthModule r=valentin
https://hg.mozilla.org/mozilla-central/rev/53675535f504
https://hg.mozilla.org/mozilla-central/rev/5662f3757fb4
https://hg.mozilla.org/mozilla-central/rev/32c4433496ab
Status: REOPENED → RESOLVED
Closed: 9 months ago9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.