V17.3.1 — env.get string-split fix + tough-cookie override
- Partial fix for #432:
getUserNames/getChatIdsnow split{env.get("X")}/{flow.get("X")}/{global.get("X")}string results on commas, so a process env var likeCHATIDS="123,456"now resolves to[123, 456]instead of the raw string. The token half of #432 remains a Node-RED credential-stripping behaviour and is addressed in the issue thread. - Dependency: tough-cookie pinned to ^4.1.3 via an npm
overridesentry to clear GHSA-72xf-g2v4-qvf3 (prototype pollution). The vulnerable copy comes in transitively via legacyrequest@2.88.2, which is pinned bynode-telegram-bot-api→@cypress/request-promise→request-promise-core's peer dependency onrequest@^2.34. Dependabot could not auto-resolve this without an explicit override.
Cumulative since V17.1.3
V17.2.0 and V17.3.0 were committed but never tagged; this release ships everything in master since V17.1.3. Highlights:
Security
- Removed
eval()from the token / usernames / chatids configuration fields (V17.2.0). Expressions are now parsed safely; only the documentedflow.get/global.get/context.get/context.flow.get/context.global.get/env.get/.keys()forms are accepted. - Bot token no longer leaked in the duplicate-token abort, the polling 401 hint, the polling_error verbose
util.inspectdump, or the webhook setup error path (V17.3.0).
Reliability
- Long-message chunked sends are now serialised through a single promise chain — the previous code dispatched every chunk in parallel and called
nodeDone()/processNext()once per chunk, corrupting the per-chat queue. - Audio send routed through
processResultso the queue advances andmessagesProcessedupdates. downloadFilegets a 60s hard timeout so a stalled CDN stream cannot leak the capturednodeDone.- Queue manager survives synchronous throws (drain head + deferred advance via
setImmediate). - Reply node removes its
onReplyToMessagelisteners on close and always callsnodeDone. - Receiver / event / command nodes track their own listener references —
bot.off(name)without a handler used to remove every listener for the event (eventemitter3 behaviour), so stopping one node deafened the rest. - Control restart no longer double-sends; pending restart timeout is cancellable on close.
abortBotawaitsdeleteWebHookbeforecloseWebHook; usesstopPolling({cancel:true})instead of reaching into_polling._lastRequest;restartPollingdropped itsdelete + nullpoke on_polling.start()handles the never-started case so a control "start" on a fresh deploy actually creates the bot.- Webhook
setWebHooksuccess now broadcasts the started status so receiver / event / command nodes attach.
Converter
new_chat_membersuserfield now comes from the array (singular field has been gone from Telegram for years).refunded_payment,paid_media,giftsubtypes are now emitted.- Empty / missing photo arrays no longer crash the converter.
Engines
- Bumped
engines.nodefrom>=12.0.0to>=14.0.0to matchsocks-proxy-agent@8(V17.2.0).
Internal
- Stale upstream-patch notes refreshed against
node-telegram-bot-api@0.66.0; obsoleteNTBA_FIX_319removed. safeStringifylifted intolib/safe-stringify.jsand reused byevent-node(which previously called rawJSON.stringifyand could throw on circularmsgpayloads).
Full per-commit detail is in CHANGELOG.md.
Open follow-ups
- Polling-restart timer-stacking on rapid
polling_errorbursts (#442). - SOCKS-proxy agent recovery on prolonged proxy interruption (#440).
out-nodedefaultcase allows method invocation viamsg.payload.type— restrict to an allowlist if external input can reach this field.- Other Dependabot advisories (
@cypress/request,request,qs,ip,brace-expansion, ...) all trace back tonode-telegram-bot-apistill using the deprecatedrequeststack.