@marcel91200 / caddy Mirror · read-only / commits / 7586e68e
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 11, 12:15 UTC

fileserver: show symlink targets verbatim (#7579)

`reveal_symlinks` was exposing symlink targets as fully resolved absolute paths, even if the target is a relative path. With this change the link target is shown as-is, without resolving anything.

Max Truxa committed Apr 14, 2026 at 20:49 UTC 7586e68e273fbe84b588e73c014d15d815413648
1 file changed +1 -2
modules/caddyhttp/fileserver/browsetplcontext.go
+1 -2
@@ -20,7 +20,6 @@ import (
20 "net/url"
21 "os"
22 "path"
23 - "path/filepath"
23 "slices"
24 "sort"
25 "strconv"
@@ -100,7 +99,7 @@ func (fsrv *FileServer) directoryListing(ctx context.Context, fileSystem fs.FS,
99 }
100
101 if fsrv.Browse.RevealSymlinks {
103 - symLinkTarget, err := filepath.EvalSymlinks(path)
102 + symLinkTarget, err := os.Readlink(path)
103 if err == nil {
104 symlinkPath = symLinkTarget
105 }