Skip to content

Commit

Permalink
fix: ReDos regex vulnerability, reported by @dayshift
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 committed Feb 14, 2025
1 parent 3af20bd commit 12a14f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class RequestError extends Error {
if (options.request.headers.authorization) {
requestCopy.headers = Object.assign({}, options.request.headers, {
authorization: options.request.headers.authorization.replace(
/ .*$/,
/(?<! ) .*$/,
" [REDACTED]",
),
});
Expand Down

0 comments on commit 12a14f0

Please sign in to comment.