Skip to content

Commit 12a14f0

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

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/index.ts

Lines changed: 1 addition & 1 deletion
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)