You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As CSV files from web applications are frequently downloaded and then opened in Excel (or similar), consideration should be made for the possibility of Formula Injection (see here)
Mitigation would be to prefix with a single quote (') character wherever a value starts with equals ("="), plus ("+"), minus ("-"), at ("@") or percentage ("%") character
Suggest: if (_val.Length > 0 && (new string[]{"=", "+". "-", "@", "%"}).Contains(_val.Substring(0,1)) _val = "'" + _val;
May be worth adding a boolean value (default true) to the CsvFormatterOptions to control this
The text was updated successfully, but these errors were encountered:
As CSV files from web applications are frequently downloaded and then opened in Excel (or similar), consideration should be made for the possibility of Formula Injection (see here)
Mitigation would be to prefix with a single quote (') character wherever a value starts with equals ("="), plus ("+"), minus ("-"), at ("@") or percentage ("%") character
Suggest:
if (_val.Length > 0 && (new string[]{"=", "+". "-", "@", "%"}).Contains(_val.Substring(0,1)) _val = "'" + _val;
May be worth adding a boolean value (default true) to the CsvFormatterOptions to control this
The text was updated successfully, but these errors were encountered: