mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
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.
This commit is contained in:
@@ -158,8 +158,7 @@ type MappedPolicy struct {
|
||||
func (mp MappedPolicy) toSlice() []string {
|
||||
var policies []string
|
||||
for _, policy := range strings.Split(mp.Policies, ",") {
|
||||
policy = strings.TrimSpace(policy)
|
||||
if policy == "" {
|
||||
if strings.TrimSpace(policy) == "" {
|
||||
continue
|
||||
}
|
||||
policies = append(policies, policy)
|
||||
|
||||
Reference in New Issue
Block a user