Skip to content

fix(glob): throw descriptive error for unbalanced braces in glob patterns#40425

Open
Thavamani13 wants to merge 1 commit intomicrosoft:mainfrom
Thavamani13:fix-40422
Open

fix(glob): throw descriptive error for unbalanced braces in glob patterns#40425
Thavamani13 wants to merge 1 commit intomicrosoft:mainfrom
Thavamani13:fix-40422

Conversation

@Thavamani13
Copy link
Copy Markdown

@Thavamani13 Thavamani13 commented Apr 26, 2026

Summary

  • globToRegexPattern() unconditionally emitted ( / ) for { / } with no balance check, producing invalid regex (e.g. /^(foo$/) that threw SyntaxError at request-match time and silently aborted navigation
  • Added guards to throw a clear Invalid glob pattern error at parse time for unmatched {, unmatched }, and nested {
  • Added 6 test assertions covering the reported patterns

Fixes #40422

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

page.route() silently aborts navigation when glob contains unbalanced { or }

1 participant