mnutt / davros

Personal file storage server
Apache License 2.0
298 stars 35 forks source link

add Download (zip) directory menu option #48

Closed timbertson closed 8 years ago

timbertson commented 8 years ago

Fixes #45

Adds a "Download (zip)" menu item for each directory. Performs validation against odd path components (like ..), but not safe against e.g. symlinks which point to files outside of the davros file store. As discussed in #45, this shouldn't pose a security risk (since users who can upload files can also just download the whole grain, and nothing sensitive is stored on the grain's container).

I was confused that this diff doesn't change package.json - my apologies, it looks like the archiver dependency accidentally snuck in as part of #46.

mnutt commented 8 years ago

I've been slowly migrating the app towards just becoming a plain webdav server. The ember UI speaks webdav, and the few non-webdav server paths just proxy to the webdav server. The idea is that at some point we could replace the underlying filesystem implementation (for versioning, for instance) and nothing would need to change except the webdav server would have a different backend.

All that being said, having the archiver run through webdav would be extremely inefficient so I like this implementation as it is. But it's something to keep in mind if we ever do swap out the storage layer.