Skip to content

utils glob-to-regex conversion edge case #236

@philoserf

Description

@philoserf

Location

  • hooks/lib/utils.js:123-127

Description

The glob-to-regex conversion replaces . with \\. then * with .*. If the input pattern already contains a literal \., the first replace produces \\. and the second leaves it alone — but if it contains * adjacent to ., the ordering can produce unexpected results. Minor edge case but the function has no escaping guard.

Suggested Fix

Use a single-pass replacer or document that only simple globs are supported.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions