dav-server-rs icon indicating copy to clipboard operation
dav-server-rs copied to clipboard

Symlinked dir is readable when hide_symlinks is true

Open ahti opened this issue 10 months ago • 1 comments

While working on adding webdav to miniserve I noticed that while hide_symlinks does prevent symlinks from being listed in PROPFIND responses, I can still get a list of the contents of a symlinked directory, by requesting its path directly.

Given this folder structure:

dirA/
    test
dirB -> dirA/

Running curl -vX PROPFIND localhost:8080 -H "Depth: 1" does not contain an entry for dirB, as expected.

However, running curl -vX PROPFIND localhost:8080/dirB -H "Depth: 1" shows the directory contents for dirA (or whatever else the link may point to).

ahti avatar Jan 14 '25 02:01 ahti

Pull requests are welcome!

messense avatar Jan 14 '25 04:01 messense