Skip to content

Commit b3d4984

Browse files
committed
fix: try to prevent regex backtracking
1 parent 18ef0cd commit b3d4984

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
@@ -392,7 +392,7 @@ export class RepositoryService {
392392
}
393393

394394
// Find the link with rel="last"
395-
const lastLinkPattern = /<[^>]+>; rel="last"/;
395+
const lastLinkPattern = /<([^>]+?)>; rel="last"/;
396396
const lastLinkMatch = linkHeader.match(lastLinkPattern);
397397

398398
if (!lastLinkMatch) {

0 commit comments

Comments
 (0)