mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 18:17:55 +00:00
VAULT-31525 Remove lowercasing of RADIUS auth. (#28884)
* remove strings package, add test case, remove lowercasing of username * adding changelog * Update changelog/28884.txt Co-authored-by: John-Michael Faircloth <fairclothjm@users.noreply.github.com> --------- Co-authored-by: John-Michael Faircloth <fairclothjm@users.noreply.github.com>
This commit is contained in:
@@ -185,7 +185,8 @@ func TestBackend_users(t *testing.T) {
|
|||||||
testStepUpdateUser(t, "web", "foo"),
|
testStepUpdateUser(t, "web", "foo"),
|
||||||
testStepUpdateUser(t, "web2", "foo"),
|
testStepUpdateUser(t, "web2", "foo"),
|
||||||
testStepUpdateUser(t, "web3", "foo"),
|
testStepUpdateUser(t, "web3", "foo"),
|
||||||
testStepUserList(t, []string{"web", "web2", "web3"}),
|
testStepUpdateUser(t, "Web4", "foo"),
|
||||||
|
testStepUserList(t, []string{"Web4", "web", "web2", "web3"}),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ package radius
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/hashicorp/vault/sdk/framework"
|
"github.com/hashicorp/vault/sdk/framework"
|
||||||
"github.com/hashicorp/vault/sdk/helper/policyutil"
|
"github.com/hashicorp/vault/sdk/helper/policyutil"
|
||||||
@@ -87,7 +86,7 @@ func (b *backend) user(ctx context.Context, s logical.Storage, username string)
|
|||||||
return nil, fmt.Errorf("missing username")
|
return nil, fmt.Errorf("missing username")
|
||||||
}
|
}
|
||||||
|
|
||||||
entry, err := s.Get(ctx, "user/"+strings.ToLower(username))
|
entry, err := s.Get(ctx, "user/"+username)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
3
changelog/28884.txt
Normal file
3
changelog/28884.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
```release-note:bug
|
||||||
|
auth/radius: Fixed an issue where usernames with upper case characters where not honored
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user