Symlinks in an ebook library can expose any server file through downloads #27
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From Nye's review of #17 (F7). Add to #15's symlink item.
The scanner uses
Path.wildcardandFile.regular?, which follow symlinks. A symlink inside a library pointing at e.g./etc/passwdbecomes an ebook record, and/ebooks/:id/downloadserves it to any signed-in user.Fix:
File.lstatin the scanner and skip symlinks (or resolve them and require the real path to stay inside the library root); check again at download time. Libraries are admin-configured, which limits this. Related: #15, #14.