Skip to content

Commit 8c61a02

Browse files
committed
fix: try to prevent regex backtracking
1 parent d607b92 commit 8c61a02

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

angular-ngrx-scss/src/app/repository/services/repository.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ export class RepositoryService {
388388
}
389389

390390
// Find the link with rel="last"
391-
const lastLinkPattern = /<[^>]+>; rel="last"/;
391+
const lastLinkPattern = /<([^>]+?)>; rel="last"/;
392392
const lastLinkMatch = linkHeader.match(lastLinkPattern);
393393

394394
if (!lastLinkMatch) {

0 commit comments

Comments
 (0)