"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
fix for caddy web server
Vasiliy Tolstov83b642e98ffc
diff --git a/http/http.go b/http/http.goindex c7367b78c..7a67dcdad 100644--- a/http/http.go+++ b/http/http.go@@ -217,9 +217,9 @@ func parseTime(n *html.Node) (t time.Time) {return t}-func (f *Fs) readDir(path string) ([]*entry, error) {+func (f *Fs) readDir(p string) ([]*entry, error) {entries := make([]*entry, 0)- res, err := f.httpClient.Get(urlJoin(f.endpoint, path))+ res, err := f.httpClient.Get(urlJoin(f.endpoint, p))if err != nil {return nil, err}@@ -244,9 +244,17 @@ func (f *Fs) readDir(path string) ([]*entry, error) {if err != nil {continue}- if name == "../" || name == "./" {+ if name == "../" || name == "./" || name == ".." {break}+ if strings.Index(name, "?") >= 0 || strings.HasPrefix(name, "http") {+ break+ }+ u, err := url.Parse(name)+ if err != nil {+ break+ }+ name = path.Clean(u.Path)e := &entry{name: strings.TrimRight(name, "/"),url: name,