mirror of
https://github.com/minio/minio.git
synced 2025-01-12 07:23:23 -05:00
Merge pull request #1053 from harshavardhana/infinite-loop
listObjects: Marker should be unescaped before being used internally.
This commit is contained in:
commit
0c96ace8ad
@ -19,6 +19,7 @@ package fs
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"hash/fnv"
|
"hash/fnv"
|
||||||
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
@ -259,10 +260,16 @@ func (fs Filesystem) ListObjects(bucket, prefix, marker, delimiter string, maxKe
|
|||||||
return ListObjectsResult{}, probe.NewError(e)
|
return ListObjectsResult{}, probe.NewError(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Unescape the marker values.
|
||||||
|
markerUnescaped, e := url.QueryUnescape(marker)
|
||||||
|
if e != nil {
|
||||||
|
return ListObjectsResult{}, probe.NewError(e)
|
||||||
|
}
|
||||||
|
|
||||||
reqParams := listObjectsParams{}
|
reqParams := listObjectsParams{}
|
||||||
reqParams.Bucket = bucket
|
reqParams.Bucket = bucket
|
||||||
reqParams.Prefix = filepath.FromSlash(prefix)
|
reqParams.Prefix = filepath.FromSlash(prefix)
|
||||||
reqParams.Marker = filepath.FromSlash(marker)
|
reqParams.Marker = filepath.FromSlash(markerUnescaped)
|
||||||
reqParams.Delimiter = filepath.FromSlash(delimiter)
|
reqParams.Delimiter = filepath.FromSlash(delimiter)
|
||||||
reqParams.MaxKeys = maxKeys
|
reqParams.MaxKeys = maxKeys
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user