Skip to content

Commit

Permalink
docs(csv-stringify): escape formulas references
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed May 9, 2023
1 parent 1fc177c commit 62de1cf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/csv-stringify/lib/api/index.js
Expand Up @@ -158,6 +158,12 @@ const stringifier = function(options, state, info){
}
});
quotedMatch = quotedMatch && quotedMatch.length > 0;
// See https://github.com/adaltas/node-csv/pull/387
// More about CSV injection or formula injection, when websites embed
// untrusted input inside CSV files:
// https://owasp.org/www-community/attacks/CSV_Injection
// http://georgemauer.net/2017/10/07/csv-injection.html
// Apple Numbers unicode normalization is empirical from testing
if (escape_formulas) {
switch (value[0]) {
case '=':
Expand Down

0 comments on commit 62de1cf

Please sign in to comment.