space characters at the beginning or at the end can lead to confusion under various UI elements in differentiating the actual name of "policy, user or group" - to avoid this behavior this PR onwards we shall reject such inputs for newer entries. existing saved entries will behave as is and are going to be operable until they are removed/renamed to something more meaningful.
Showing the changes to cmd/api-errors.go (1 of 5 files). Show all
Unified · Split
| @@ -383,6 +383,7 @@ const ( · 382 unmodified lines | ||
| 383 | 383 | ErrAdminProfilerNotEnabled |
| 384 | 384 | ErrInvalidDecompressedSize |
| 385 | 385 | ErrAddUserInvalidArgument |
| 386 | + ErrAdminResourceInvalidArgument | |
| 386 | 387 | ErrAdminAccountNotEligible |
| 387 | 388 | ErrAccountNotEligible |
| 388 | 389 | ErrAdminServiceAccountNotFound |
| @@ -1825,6 +1826,11 @@ var errorCodes = errorCodeMap{ · 1436 unmodified lines | ||
| 1825 | 1826 | Description: "User is not allowed to be same as admin access key", |
| 1826 | 1827 | HTTPStatusCode: http.StatusForbidden, |
| 1827 | 1828 | }, |
| 1829 | + ErrAdminResourceInvalidArgument: { | |
| 1830 | + Code: "XMinioInvalidResource", | |
| 1831 | + Description: "Policy, user or group names are not allowed to begin or end with space characters", | |
| 1832 | + HTTPStatusCode: http.StatusBadRequest, | |
| 1833 | + }, | |
| 1828 | 1834 | ErrAdminAccountNotEligible: { |
| 1829 | 1835 | Code: "XMinioInvalidIAMCredentials", |
| 1830 | 1836 | Description: "The administrator key is not eligible for this operation", |