4 ms·
The moral of the story is that dealing with the filesystem is like dealing with the reactor room at Chernobyl. Stay away from it unless there is no other optio
by tome 5y ago
The moral of the story is that dealing with the filesystem is like dealing with the reactor room at Chernobyl. Stay away from it unless there is no other option. Instead use a decent database with simple transactional and addressing semantics.
- alecbz 5y agoNot really at all the lesson IMO? You could replace the call to `mkdir` with a `psql` call and have the same security hole. The primary issue is with using a shell/subprocess. Maybe you could make the case that "there tend to be better in-language libs for dealing with databases than filesystems". Not sure that's true, even if it is it's sort of a secondary lesson.