Skip to content

Commit

Permalink
Fix redactToken; closes telegraf#1522
Browse files Browse the repository at this point in the history
  • Loading branch information
wojpawlik committed Sep 11, 2021
1 parent 6479d69 commit 019c554
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/network/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ async function answerToWebhook(
}

function redactToken(error: Error): never {
error.message = error.message.replace(/:[^/]+/, ':[REDACTED]')
error.message = error.message.replace(/\/bot(\d+):[^/]+\//, '/$1:[REDACTED]/')
throw error
}

Expand Down

0 comments on commit 019c554

Please sign in to comment.