mirror of
https://github.com/minio/minio.git
synced 2025-11-21 10:16:03 -05:00
Check key length before adding a new user. (#6790)
User's key should satisfy the requirement of `mc config host add`. Check access key and secret key length before adding a new user, avoid creating a useless user which cannot be added into config host or log into the browser.
This commit is contained in:
@@ -47,7 +47,7 @@ func TestIsSecretKeyValid(t *testing.T) {
|
||||
}
|
||||
|
||||
for i, testCase := range testCases {
|
||||
result := isSecretKeyValid(testCase.secretKey)
|
||||
result := IsSecretKeyValid(testCase.secretKey)
|
||||
if result != testCase.expectedResult {
|
||||
t.Fatalf("test %v: expected: %v, got: %v", i+1, testCase.expectedResult, result)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user