fix(logging): redact Telegram tokens across chunk boundaries#103861
Merged
Conversation
vincentkoc
marked this pull request as ready for review
July 10, 2026 17:35
Contributor
|
Codex review: stale review; fresh review needed. Summary Next step |
vincentkoc
force-pushed
the
fix/telegram-token-redaction-boundary
branch
from
July 10, 2026 18:18
e3abbc0 to
1e9a265
Compare
Member
Author
|
Merged via squash.
|
vincentkoc
added a commit
that referenced
this pull request
Jul 11, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Fixes an issue where Telegram bot credentials could remain visible in large log or tool-error strings when the credential crossed the 16,384-character bounded-redaction split.
Why This Change Was Made
The shared redactor now treats the two built-in Telegram credential patterns as full-context patterns. Those two linear regexes run against the complete string, while every other default pattern keeps the existing bounded-replacement behavior.
A focused regression covers both the Bot API URL form and the bare credential form with synthetic inputs larger than 32 KiB.
User Impact
Telegram operators no longer risk exposing a bot credential solely because it straddled an internal redaction chunk boundary. Normal redaction output and the performance behavior of unrelated credential patterns are unchanged.
Evidence
mainreproduction at5aea34ad8c210ddba5a678d64c559da8414baea7:leaked=false, output changed.leaked=false, output changed.tbx_01kx6h7my69dczc9yrfej5gabs:corepack pnpm test:serial src/logging/redact.test.ts: 118/118 passed.corepack pnpm check:changed: both tsgo lanes, core lint, and selected guards passed.git diff --checkpassed.