mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Check pathlength before reading metadata (#13080)
fixes bug where the server returns 503 instead of 400 if objectName is longer than 255 characters Fixes regression introduced in #12942
This commit is contained in:
committed by
GitHub
parent
c11a2ac396
commit
27f895cf2c
@@ -397,6 +397,10 @@ func (s *xlStorage) Healing() *healingTracker {
|
||||
}
|
||||
|
||||
func (s *xlStorage) readMetadata(itemPath string) ([]byte, error) {
|
||||
if err := checkPathLength(itemPath); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
f, err := OpenFile(itemPath, readMode, 0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user