diff options
author | 2022-11-28 09:01:53 +0000 | |
---|---|---|
committer | 2022-11-28 09:01:53 +0000 | |
commit | fe39d50e09c1fcf5d13386e15951c5608e7df0e4 (patch) | |
tree | 8101dfc2573c43705c09189a3589693fdaf14124 /vendor/codeberg.org/gruf/go-store/v2/storage | |
parent | fix missing lookup cache key for invalid domain block (#1158) (diff) | |
download | gotosocial-fe39d50e09c1fcf5d13386e15951c5608e7df0e4.tar.xz |
[chore]: Bump codeberg.org/gruf/go-store/v2 from 2.0.9 to 2.0.10 (#1160)
Bumps codeberg.org/gruf/go-store/v2 from 2.0.9 to 2.0.10.
---
updated-dependencies:
- dependency-name: codeberg.org/gruf/go-store/v2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/codeberg.org/gruf/go-store/v2/storage')
-rw-r--r-- | vendor/codeberg.org/gruf/go-store/v2/storage/block.go | 4 | ||||
-rw-r--r-- | vendor/codeberg.org/gruf/go-store/v2/storage/disk.go | 10 | ||||
-rw-r--r-- | vendor/codeberg.org/gruf/go-store/v2/storage/fs.go | 2 |
3 files changed, 6 insertions, 10 deletions
diff --git a/vendor/codeberg.org/gruf/go-store/v2/storage/block.go b/vendor/codeberg.org/gruf/go-store/v2/storage/block.go index b1081cb1c..f41099c75 100644 --- a/vendor/codeberg.org/gruf/go-store/v2/storage/block.go +++ b/vendor/codeberg.org/gruf/go-store/v2/storage/block.go @@ -676,10 +676,6 @@ func (st *BlockStorage) nodePathForKey(key string) (string, error) { pb := util.GetPathBuilder() defer util.PutPathBuilder(pb) - // Append the nodepath to key - pb.AppendString(st.nodePath) - pb.AppendString(key) - // Return joined + cleaned node-path return pb.Join(st.nodePath, key), nil } diff --git a/vendor/codeberg.org/gruf/go-store/v2/storage/disk.go b/vendor/codeberg.org/gruf/go-store/v2/storage/disk.go index dab1d6128..ef6993edd 100644 --- a/vendor/codeberg.org/gruf/go-store/v2/storage/disk.go +++ b/vendor/codeberg.org/gruf/go-store/v2/storage/disk.go @@ -394,16 +394,16 @@ func (st *DiskStorage) filepath(key string) (string, error) { pb := util.GetPathBuilder() defer util.PutPathBuilder(pb) - // Generated joined root path - pb.AppendString(st.path) - pb.AppendString(key) + // Generate key path + pb.Append(st.path) + pb.Append(key) // Check for dir traversal outside of root - if isDirTraversal(st.path, pb.StringPtr()) { + if isDirTraversal(st.path, pb.String()) { return "", ErrInvalidKey } - return pb.String(), nil + return string(pb.B), nil } // isDirTraversal will check if rootPlusPath is a dir traversal outside of root, diff --git a/vendor/codeberg.org/gruf/go-store/v2/storage/fs.go b/vendor/codeberg.org/gruf/go-store/v2/storage/fs.go index 658b7e762..48a5806f2 100644 --- a/vendor/codeberg.org/gruf/go-store/v2/storage/fs.go +++ b/vendor/codeberg.org/gruf/go-store/v2/storage/fs.go @@ -5,7 +5,7 @@ import ( "os" "syscall" - "codeberg.org/gruf/go-fastpath" + "codeberg.org/gruf/go-fastpath/v2" "codeberg.org/gruf/go-store/v2/util" ) |