node-red-node-email: IMAP with XOAuth2 fails against Exchange Online – "Logging in is disabled on this server"
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 半天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- javascript, nodejs
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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) {
- 主要语言
- JavaScript
- 星标
- 1.1k
- 派生
- 610
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
node-red/node-red-nodes 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 42/100
node-red/node-red-nodes#1151 · 4 条评论 ·
-
难度 3/5 1-2 天 新手友好度 58/100
node-red/node-red-nodes#1142 · 11 条评论 ·
-
难度 4/5 3-5 天 新手友好度 45/100
node-red/node-red-nodes#1141 · 15 条评论 ·
-
难度 4/5 3-5 天 新手友好度 45/100
node-red/node-red-nodes#1130 · 4 条评论 ·
-
dependencies
难度 5/5 一周以上 新手友好度 25/100
node-red/node-red-nodes#1121 · 5 条评论 ·
查看 node-red/node-red-nodes 的全部 Issue
相似的 Issue
-
app_installations reports an error on every repo or suborg change when the plugin is not configured未关闭
难度 2/5 1-3 小时 新手友好度 64/100
github-community-projects/safe-settings#1111 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
needs triage
难度 2/5 1-3 小时 新手友好度 82/100
pbakaus/impeccable#1055 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
guaguastandup/zotero-pdf2zh#368 ·
-
Add: EUROTV NEWS未关闭channels:add check:passed
难度 2/5 1-3 小时 新手友好度 70/100