8000 Filtering method for formulas in Excel output formats by gohanman · Pull Request #933 · CORE-POS/IS4C · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Filtering method for formulas in Excel output formats #933

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

Merged
merged 1 commit into from
Oct 10, 2017
Merged

Conversation

gohanman
Copy link
Contributor
  Reduce potential for CSV based exploits

  Different spreadsheet software *may* interpret values in CSVs/TSVs
  that begin with =, @, +, or - as forumals and cause the spreadsheet to
  execute the cell's value. This may or may not include user-facing 
  warning messages.

  One common solution is to prefix such fields with single quote ('). I'm
  not using that option since it creates different headaches for users trying
  to use the CSV/TSV as a data interchange format rather than just look at
  it in Excel. Instead:

  1. Leading =, @, or + characters are simply removed. This should include multiples,
     e.g. "=@+=1+1" becomes "1+1". This creates a small set of strings that cannot
     be used as product names, brands, etc but should be an OK compromise.
  2. Values with a leading - do need to be allowed. This are validated as either
     negative integers (-123) or negative floats (-123.45).

@gohanman gohanman merged commit 409d41a into master Oct 10, 2017
@gohanman gohanman deleted the csv-sanitize branch December 29, 2017 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0