Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

N8N-3776-expressions-xss-part-2 #4

Merged
merged 3 commits into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions dist/csp.tmpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -7547,6 +7547,8 @@ var tmpl = (function () {

if (expr.slice(0, 11) !== 'try{return ') expr = 'return ' + expr;

expr = 'var ' + (typeof window !== 'object' ? 'global' : 'window') + ' = {}; ' + expr;

return safeEval.func('E', expr + ';')
}

Expand Down Expand Up @@ -7640,6 +7642,7 @@ var tmpl = (function () {
expr = !cnt ? _wrapExpr(expr, asText)
: cnt > 1 ? '[' + list.join(',') + '].join(" ").trim()' : list[0];
}

return expr

function skipBraces (ch, re) {
Expand Down
3 changes: 3 additions & 0 deletions dist/es6.tmpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ var tmpl = (function () {

if (expr.slice(0, 11) !== 'try{return ') expr = 'return ' + expr

expr = 'var ' + (typeof window !== 'object' ? 'global' : 'window') + ' = {}; ' + expr

return new Function('E', expr + ';') // eslint-disable-line no-new-func
}

Expand Down Expand Up @@ -470,6 +472,7 @@ var tmpl = (function () {
expr = !cnt ? _wrapExpr(expr, asText)
: cnt > 1 ? '[' + list.join(',') + '].join(" ").trim()' : list[0]
}

return expr

function skipBraces (ch, re) {
Expand Down
3 changes: 3 additions & 0 deletions dist/tmpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@

if (expr.slice(0, 11) !== 'try{return ') expr = 'return ' + expr

expr = 'var ' + (typeof window !== 'object' ? 'global' : 'window') + ' = {}; ' + expr

return new Function('E', expr + ';') // eslint-disable-line no-new-func
}

Expand Down Expand Up @@ -465,6 +467,7 @@
expr = !cnt ? _wrapExpr(expr, asText)
: cnt > 1 ? '[' + list.join(',') + '].join(" ").trim()' : list[0]
}

return expr

function skipBraces (ch, re) {
Expand Down
Loading