Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.

Modify Regex to avoid ReDoS#223

Closed
jmprentice wants to merge 1 commit intowebpack:masterfrom
jmprentice:master
Closed

Modify Regex to avoid ReDoS#223
jmprentice wants to merge 1 commit intowebpack:masterfrom
jmprentice:master

Conversation

@jmprentice
Copy link

As described in #216 (comment), this is offered as a potential fix for the security vulnerability identified in the interpolateName.js method. I used this online ReDoS checker: https://devina.io/redos-checker

The interpolateName.js tests pass with this change, but I'm not familiar enough with the code to be sure this wouldn't introduce problems for some valid inputs.

I'm submitting PRs for all three branches because our projects need versions 2.x and 1.x (loader-utils is a transitive dependency in multiple packages).

@linux-foundation-easycla
Copy link

CLA Not Signed

@codecov
Copy link

codecov bot commented Nov 11, 2022

Codecov Report

Base: 76.66% // Head: 76.66% // No change to project coverage 👍

Coverage data is based on head (089bf28) compared to base (52cd134).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #223   +/-   ##
=======================================
  Coverage   76.66%   76.66%           
=======================================
  Files          10       10           
  Lines         360      360           
  Branches      112      112           
=======================================
  Hits          276      276           
  Misses         73       73           
  Partials       11       11           
Impacted Files Coverage Δ
lib/interpolateName.js 95.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@alexander-akait
Copy link
Member

Fixed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants