Skip to content

Commit 12a14f0

Browse files
committed
fix: ReDos regex vulnerability, reported by @dayshift
1 parent 3af20bd commit 12a14f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class RequestError extends Error {
7676
if (options.request.headers.authorization) {
7777
requestCopy.headers = Object.assign({}, options.request.headers, {
7878
authorization: options.request.headers.authorization.replace(
79-
/ .*$/,
79+
/(?<! ) .*$/,
8080
" [REDACTED]",
8181
),
8282
});

0 commit comments

Comments
 (0)