Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion UiFileManager/media/codemirror/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -17366,7 +17366,12 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
var kw = keywords[word]
return ret(kw.type, kw.style, word)
}
if (word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/, false))

// vulnerable code: https://security.snyk.io/vuln/SNYK-JS-CODEMIRROR-1016937
// if (word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/, false))

// Fix: https://github.com/codemirror/codemirror5/blob/a0854c752a76e4ba9512a9beedb9076f36e4f8f9/mode/javascript/javascript.js#L130C36-L130C36
if (word == "async" && stream.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, false))
return ret("async", "keyword", word)
}
return ret("variable", "variable", word)
Expand Down
6 changes: 5 additions & 1 deletion UiFileManager/media/codemirror/mode/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
var kw = keywords[word]
return ret(kw.type, kw.style, word)
}
if (word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/, false))
// vulnerable code: https://security.snyk.io/vuln/SNYK-JS-CODEMIRROR-1016937
//if (word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/, false))

// Fix: https://github.com/codemirror/codemirror5/blob/a0854c752a76e4ba9512a9beedb9076f36e4f8f9/mode/javascript/javascript.js#L130C36-L130C36
if (word == "async" && stream.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, false))
return ret("async", "keyword", word)
}
return ret("variable", "variable", word)
Expand Down