node-red-node-email: IMAP with XOAuth2 fails against Exchange Online – "Logging in is disabled on this server"
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- Ein halber Tag
- Anfängerfreundlichkeit
- 42/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- javascript, nodejs
- Bereich
- authentication, networking
Rechercherichtung
The failing check is the LOGINDISABLED test in lib/Connection.js of the bundled imap dependency, which runs before the AUTH=XOAUTH2 path. Start by confirming whether the email node passes its xoauth2 settings through to that library, then decide whether the fix belongs in the node or upstream. Done means IMAP XOAUTH2 authenticates against a server that advertises LOGINDISABLED, with the existing PLAIN and LOGIN paths unchanged.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Which node are you reporting and issue on?
node-red-node-email (email in node, IMAP) – v5.2.5
What are the steps to reproduce?
Configure the email in node for Exchange Online:
Protocol: IMAP
SSL: enabled, STARTTLS: never
Server: outlook.office365.com, Port: 993
Auth type: XOAuth2, Format to SASL: enabled
Token: valid access token from msg.oauth2Response.access_token (client credentials flow, scope https://outlook.office365.com/.default)
Trigger the node.
This setup worked without changes until recently.
What happens?
The node fails with:
Logging in is disabled on this server
No authentication attempt is sent to the server.
Exchange Online now advertises LOGINDISABLED on port 993 (TLS) and no longer offers AUTH=PLAIN:
- OK Microsoft Exchange IMAP4 service ready. ...
a1 CAPABILITY - CAPABILITY IMAP4 IMAP4rev1 AUTH=XOAUTH2 LOGINDISABLED SASL-IR UIDPLUS MOVE ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+
a1 OK CAPABILITY completed.
The bundled imap library (mscdex/node-imap) checks for LOGINDISABLED in lib/Connection.js before checking for AUTH=XOAUTH2, and aborts:
js
if (this.serverSupports('LOGINDISABLED')) {
err = new Error('Logging in is disabled on this server');
...
}
LOGINDISABLED (RFC 3501) only forbids the plaintext LOGIN command. It should not prevent SASL AUTHENTICATE XOAUTH2.
What did you expect to happen?
When XOAuth2 is configured and the server advertises AUTH=XOAUTH2, the node should authenticate via AUTHENTICATE XOAUTH2 regardless of LOGINDISABLED.
Example flow
No response
Environment
Workaround:
Patching lib/Connection.js of the imap dependency resolves the issue:
Connection.js
if (this.serverSupports('LOGINDISABLED') && !this._config.xoauth2 && !this._config.xoauth) {
- Vorherrschende Sprache
- JavaScript
- Sterne
- 1.1k
- Forks
- 610
- Ø Merge
- 1 T. 4 Std.
- Gemergte PRs (30 T.)
- 2
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus node-red/node-red-nodes
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 42/100
node-red/node-red-nodes#1151 · 4 Kommentare ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 58/100
node-red/node-red-nodes#1142 · 11 Kommentare ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
node-red/node-red-nodes#1141 · 15 Kommentare ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
node-red/node-red-nodes#1130 · 4 Kommentare ·
-
dependencies
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
node-red/node-red-nodes#1121 · 5 Kommentare ·
Alle Issues in node-red/node-red-nodes
Ähnliche Issues
-
change request evaluating
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
sindresorhus/eslint-plugin-unicorn#3907 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Android bug feature/error-tracking react-native team/error-tracking
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
PostHog/posthog-js#5310 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Add Prettier and a format-check CI jobEvtl. vergeben @ezekielnathaniel070-ai hat das heute übernommen. Offenbackend frontend good first issue Stellar Wave
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
OlaGreat/starbound-realms#98 · 1 Kommentar ·
-
Add AudiobookshelfOffenapp request good first issue help wanted self-hosted app
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Secra-Solutions/Conector#15 ·
-
Complexity: See issue making label epic good first issue Issue Making: Level 1 P-Feature: Project Info and Page role: back end/devOps role: front end size: 0.25pt time sensitive
Schwierigkeit 2/5 Unter einer Stunde Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag