mirror of
https://github.com/pgsty/minio.git
synced 2026-07-18 19:50:23 +03:00
add isValidLocation to common parseLocation (#16690)
This commit is contained in:
@@ -58,6 +58,10 @@ func parseLocationConstraint(r *http.Request) (location string, s3Error APIError
|
||||
if location == "" {
|
||||
location = globalSite.Region
|
||||
}
|
||||
if !isValidLocation(location) {
|
||||
return location, ErrInvalidRegion
|
||||
}
|
||||
|
||||
return location, ErrNone
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user