Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 17cbf8f

Browse filesBrowse files
fix: ReDoS problem (#226)
1 parent 8f082b3 commit 17cbf8f
Copy full SHA for 17cbf8f

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎lib/interpolateName.js

Copy file name to clipboardExpand all lines: lib/interpolateName.js
+1-1
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.