mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 03:24:26 +00:00
fix: allow unused keys in hasher config (#6724)
This commit is contained in:
parent
95889cf576
commit
0af1c65c4c
@ -147,7 +147,7 @@ func (c *HasherConfig) buildHasher() (hasher passwap.Hasher, prefixes []string,
|
|||||||
|
|
||||||
func (c *HasherConfig) decodeParams(dst any) error {
|
func (c *HasherConfig) decodeParams(dst any) error {
|
||||||
decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{
|
decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{
|
||||||
ErrorUnused: true,
|
ErrorUnused: false,
|
||||||
ErrorUnset: true,
|
ErrorUnset: true,
|
||||||
Result: dst,
|
Result: dst,
|
||||||
})
|
})
|
||||||
|
@ -379,7 +379,10 @@ func TestHasherConfig_decodeParams(t *testing.T) {
|
|||||||
"b": 2,
|
"b": 2,
|
||||||
"c": 3,
|
"c": 3,
|
||||||
},
|
},
|
||||||
wantErr: true,
|
want: dst{
|
||||||
|
A: 1,
|
||||||
|
B: 2,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "unset",
|
name: "unset",
|
||||||
|
Loading…
Reference in New Issue
Block a user