History

fix: disallow newer policies, users & groups with space characters (#14845)

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.

Harshavardhana committed 4 years ago

Commit 16bc11e1 parent 2719f1e5 files · +49 −8Browse files

Showing the changes to cmd/api-errors.go (1 of 5 files). Show all

Unified · Split

cmd/api-errors.go+6−0
@@ -383,6 +383,7 @@ const ( · 382 unmodified lines
383 ErrAdminProfilerNotEnabled383 ErrAdminProfilerNotEnabled
384 ErrInvalidDecompressedSize384 ErrInvalidDecompressedSize
385 ErrAddUserInvalidArgument385 ErrAddUserInvalidArgument
386 ErrAdminResourceInvalidArgument
386 ErrAdminAccountNotEligible387 ErrAdminAccountNotEligible
387 ErrAccountNotEligible388 ErrAccountNotEligible
388 ErrAdminServiceAccountNotFound389 ErrAdminServiceAccountNotFound
@@ -1825,6 +1826,11 @@ var errorCodes = errorCodeMap{ · 1436 unmodified lines
1825 Description: "User is not allowed to be same as admin access key",1826 Description: "User is not allowed to be same as admin access key",
1826 HTTPStatusCode: http.StatusForbidden,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 ErrAdminAccountNotEligible: {1834 ErrAdminAccountNotEligible: {
1829 Code: "XMinioInvalidIAMCredentials",1835 Code: "XMinioInvalidIAMCredentials",
1830 Description: "The administrator key is not eligible for this operation",1836 Description: "The administrator key is not eligible for this operation",

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t