From 85b5d2653c2c0ae8abc5a104b04f0f1d64fd2a65 Mon Sep 17 00:00:00 2001 From: Page Asgardius Date: Wed, 6 Mar 2024 05:37:00 -0700 Subject: [PATCH] rebase --- internal/app/s3manager/bucket_view.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/app/s3manager/bucket_view.go b/internal/app/s3manager/bucket_view.go index 021160d..d705903 100644 --- a/internal/app/s3manager/bucket_view.go +++ b/internal/app/s3manager/bucket_view.go @@ -9,6 +9,7 @@ import ( "regexp" "strings" "time" + "net/url" "github.com/minio/minio-go/v7" ) @@ -37,8 +38,11 @@ func HandleBucketView(s3 S3, templates fs.FS, allowDelete bool, listRecursive bo regex := regexp.MustCompile(`\/buckets\/([^\/]*)\/?(.*)`) matches := regex.FindStringSubmatch(r.RequestURI) bucketName := matches[1] - path := matches[2] - + path, rqerr := url.QueryUnescape(matches[2]) + if rqerr != nil { + handleHTTPError(w, rqerr) + return + } var objs []objectWithIcon doneCh := make(chan struct{}) defer close(doneCh)