CsvHelper.Excel icon indicating copy to clipboard operation
CsvHelper.Excel copied to clipboard

Method not found: get_SanitizeForInjection()

Open completej opened this issue 2 years ago • 0 comments

Describe the bug ExcelWriter fails to export.

To Reproduce Steps to reproduce the behavior:

  1. Use CsvHelper 29+

Expected behavior ExcelWriter should export to xlsx as expected

Versions (please complete the following information):

  • CSVHelper: 29.0.0
  • CSVHelper.Excel.Core: 27.2.1

From CsvHelper changelog @ https://joshclose.github.io/CsvHelper/change-log/ :

Changed CsvConfiguration.SanitizeInjection flag to CsvConfiguration.InjectionOptions enum.

Options are:
    None - Default. Does no injection protection. The is default because it's not a part of CSV and is used for an external tool.
    Escape - Escapes the field based on OWASP recommendations if an injection char is detected.
    Strip - Removes the injection character.
    Exception - Throws an exception if an injection char is detected.
Added \t and \r to CsvConfiguration.InjectionEscapeCharacter.
Changed CsvConfiguration.InjectionEscapeCharacter from \t to '.

and

Breaking Changes

CsvConfiguration.SanitizeForInjection -> CsvConfiguration.InjectionOptions
bool IWriterConfiguration.SanitizeForInjection -> InjectionOptions IWriterConfiguration.InjectionOptions

completej avatar Apr 30 '23 21:04 completej