summaryrefslogtreecommitdiff
path: root/src/net/http
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2020-06-26 14:25:33 -0400
committerCherry Zhang <cherryyz@google.com>2020-06-26 14:25:33 -0400
commit92051a989b65a366e46bde00cd6569a91fb655cb (patch)
tree3b7f31fcc2eebde4401cef6714a3440fa18d4f7b /src/net/http
parent7dbd40babff7998a16b8e71fb583a082be4bb547 (diff)
parent186e61f319c2fb0d0abc72c85d8818eba06e26e3 (diff)
downloadgo-git-92051a989b65a366e46bde00cd6569a91fb655cb.tar.gz
[dev.link] all: merge branch 'master' into dev.link
Clean merge. Change-Id: I2ae0e4cc67e24216c85619717657dce36e887a54
Diffstat (limited to 'src/net/http')
-rw-r--r--src/net/http/fs.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/net/http/fs.go b/src/net/http/fs.go
index f95f2426b7..07d15b07e9 100644
--- a/src/net/http/fs.go
+++ b/src/net/http/fs.go
@@ -30,11 +30,13 @@ import (
// value is a filename on the native file system, not a URL, so it is separated
// by filepath.Separator, which isn't necessarily '/'.
//
-// Note that Dir will allow access to files and directories starting with a
-// period, which could expose sensitive directories like a .git directory or
-// sensitive files like .htpasswd. To exclude files with a leading period,
-// remove the files/directories from the server or create a custom FileSystem
-// implementation.
+// Note that Dir could expose sensitive files and directories. Dir will follow
+// symlinks pointing out of the directory tree, which can be especially dangerous
+// if serving from a directory in which users are able to create arbitrary symlinks.
+// Dir will also allow access to files and directories starting with a period,
+// which could expose sensitive directories like .git or sensitive files like
+// .htpasswd. To exclude files with a leading period, remove the files/directories
+// from the server or create a custom FileSystem implementation.
//
// An empty Dir is treated as ".".
type Dir string