mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
Add disclaimer about path trasversal
This commit is contained in:
parent
42521f721c
commit
fc02e7ef57
@ -12,6 +12,12 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// DISCLAIMER: this doesn't sanitize the target path so some may think
|
||||
// that path trasversal would be possible and the user could change files
|
||||
// outside of their scope. The User.FileSystem variable is of type webdav.Dir
|
||||
// which does those checks so this package doesn't need to do them.
|
||||
// https://github.com/golang/net/blob/master/webdav/file.go#L68
|
||||
|
||||
func resourceHandler(c *RequestContext, w http.ResponseWriter, r *http.Request) (int, error) {
|
||||
switch r.Method {
|
||||
case http.MethodGet:
|
||||
|
Loading…
Reference in New Issue
Block a user