4 ms·
Their proposed solution is not compatible with reality though where POSIX does not get to define what kind of files exist on filesystems you need to work with.
by account42 2y ago
Their proposed solution is not compatible with reality though where POSIX does not get to define what kind of files exist on filesystems you need to work with.
All they did is introduce new error cases in C programs while not actually fixing anything for shell scripts.
If anything, it's going to result in more exploits as people write shell scripts with the assumption that newlines cannot appear in filenames.
- quotemstr 2y agoIn the real world, nobody writes shell scripts that handle newlines in filenames.
- account42 2y agoI do. Single files are handled with quotes around arguments just fine. For lists of files you need to use NUL as a separator. That's not really hard to do once you are aware of the problem but ergonomics could be better - which is something useful that POSIX could change.
- quotemstr 2y agoMost shell scripts that correctly handle newlines do so by accident.
- account42 2y agoBecause they don't deal with lists of files so this whole issue doesn't apply? Yes. Even more reason to just fix the shell scripts where this matters instead of trying to impose additional restrictions on filesystems with many decades of history.