Page MenuHomePhabricator

Mangle cells that look a little bit like formulas in CSV files
ClosedPublic

Authored by epriestley on Jan 31 2018, 12:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 20, 12:24 AM
Unknown Object (File)
Tue, Mar 12, 8:33 PM
Unknown Object (File)
Feb 22 2024, 12:44 AM
Unknown Object (File)
Feb 20 2024, 6:10 AM
Unknown Object (File)
Feb 11 2024, 5:25 PM
Unknown Object (File)
Feb 9 2024, 2:03 PM
Unknown Object (File)
Feb 8 2024, 1:57 PM
Unknown Object (File)
Jan 18 2024, 1:02 AM
Subscribers
None

Details

Summary

Fixes T12800. See that task for discussion. When a cell in a CSV begins with "=", "+", "-", or "@", mangle the content to discourage Excel from executing it.

This is clumsy, but we support other formats (e.g., JSON) which preserve the data faithfully and you should probably be using JSON if you're going to do anything programmatic with it.

We could add two formats or a checkbox or a warning or something but cells with these symbols are fairly rare anyway.

Some possible exceptions I can think of are "user monograms" (but we don't export those right now) and "negative numbers" (but also no direct export today). We can add exceptions for those as they arise.

Test Plan

Exported a task named =cmd|'/C evil.exe'!A0, saw the title get mangled with "(!)" in front.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable