Content-Length: 270935 | pFad | https://github.com/webpack/loader-utils/commit/17cbf8fa8989c1cb45bdd2997aa524729475f1fa

CA fix: ReDoS problem (#226) · webpack/loader-utils@17cbf8f · GitHub
Skip to content

Commit 17cbf8f

Browse files
fix: ReDoS problem (#226)
1 parent 8f082b3 commit 17cbf8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/interpolateName.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function interpolateName(loaderContext, name, options) {
108108
// `hash` and `contenthash` are same in `loader-utils` context
109109
// let's keep `hash` for backward compatibility
110110
.replace(
111-
/\[(?:([^:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*))?(?::(\d+))?\]/gi,
111+
/\[(?:([^[:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*))?(?::(\d+))?\]/gi,
112112
(all, hashType, digestType, maxLength) =>
113113
getHashDigest(content, hashType, digestType, parseInt(maxLength, 10))
114114
)

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/webpack/loader-utils/commit/17cbf8fa8989c1cb45bdd2997aa524729475f1fa

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy