picomatch icon indicating copy to clipboard operation
picomatch copied to clipboard

fix: exception when glob pattern contains `constructor`

Open Jason3S opened this issue 7 months ago • 3 comments

Picomatch will throw exceptions when the glob contains any Object instance property names.

Examples: constructor, __proto__, toString

Related to issue: https://github.com/streetsidesoftware/cspell/issues/7194

Jason3S avatar Apr 18 '25 13:04 Jason3S

@jonschlinkert,

Is there any way this can make it in? There is a similar fix in #132, but it is slower.

Jason3S avatar Apr 18 '25 13:04 Jason3S

Coverage Status

coverage: 91.968%. remained the same when pulling a9e2dd27a3bc1e6298ba005c0bc8587162eefa18 on Jason3S:jdent-object-properties into bf6a33bd3db990edfbfd20b3b160eed926cd07dd on micromatch:master.

coveralls avatar Apr 18 '25 14:04 coveralls

@jonschlinkert, could you please take a look at this when you have a moment?

I spent some time debugging an error with tsup --watch in my project and traced it back to this issue.

ngraef avatar May 22 '25 21:05 ngraef

@jonschlinkert Thank you.

Jason3S avatar Jul 16 '25 05:07 Jason3S