mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
fix: validate incoming uploadID to be base64 encoded (#17865)
Bonus fixes include - do not have to write final xl.meta (renameData) does this already, saves some IOPs. - make sure to purge the multipart directory properly using a recursive delete, otherwise this can easily pile up and rely on the stale uploads cleanup. fixes #17863
This commit is contained in:
@@ -2528,11 +2528,14 @@ func (s *xlStorage) RenameData(ctx context.Context, srcVolume, srcPath string, f
|
||||
}
|
||||
}
|
||||
|
||||
// srcFilePath is always in minioMetaTmpBucket, an attempt to
|
||||
// remove the temporary folder is enough since at this point
|
||||
// ideally all transaction should be complete.
|
||||
|
||||
Remove(pathutil.Dir(srcFilePath))
|
||||
if srcVolume != minioMetaMultipartBucket {
|
||||
// srcFilePath is some-times minioMetaTmpBucket, an attempt to
|
||||
// remove the temporary folder is enough since at this point
|
||||
// ideally all transaction should be complete.
|
||||
Remove(pathutil.Dir(srcFilePath))
|
||||
} else {
|
||||
s.deleteFile(srcVolumeDir, pathutil.Dir(srcFilePath), true, false)
|
||||
}
|
||||
return sign, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user