GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge pull request #144 from Jason3S/jdent-object-properties · micromatch/picomatch@3f4f10e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • constants.js
  • test
    • malicious.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/constants.js‎

Copy file name to clipboardExpand all lines: lib/constants.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ module.exports = {
9797

9898
// Replace globs with equivalent patterns to reduce parsing time.
9999
REPLACEMENTS: {
100+
__proto__: null,
100101
'***': '*',
101102
'**/**': '**',
102103
'**/**/**': '**'
Collapse file

‎test/malicious.js‎

Copy file name to clipboardExpand all lines: test/malicious.js
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,9 @@ describe('handling of potential regex exploits', () => {
3030
assert(!isMatch('A', `!(${repeat(500)}A)`, { maxLength: 499 }));
3131
}, /Input length: 504, exceeds maximum allowed length: 499/);
3232
});
33+
it('should be able to accept Object instance properties', () => {
34+
assert(isMatch('constructor', 'constructor'), 'valid match');
35+
assert(isMatch('__proto__', '__proto__'), 'valid match');
36+
assert(isMatch('toString', 'toString'), 'valid match');
37+
});
3338
});

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.