Skip to content

Commit

Permalink
fix: do not assume patch ranges are pure semver notation
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Drukh committed Jul 10, 2019
1 parent 170126b commit 598ca96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/protect/apply-patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function applyPatch(patchFileName, vuln, live, patchUrl) {
}

const versionOfPackageToPatch = pkg.version;
const patchableVersionsRange = vuln.patches.version;
const patchableVersionsRange = semver.coerce(vuln.patches.version);
if (semver.satisfies(versionOfPackageToPatch, patchableVersionsRange)) {
debug('Patch version range %s matches package version %s',
patchableVersionsRange, versionOfPackageToPatch);
Expand Down

0 comments on commit 598ca96

Please sign in to comment.