mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 12:26:34 +02:00
Use reflect.Value.String() rather than a type assertion.
Fixes a panic in hashstructure/auditing that can occur with custom string types. Fixes #973
This commit is contained in:
parent
1dc52267a8
commit
7876b8b7fe
@ -186,7 +186,7 @@ func (w *hashWalker) Primitive(v reflect.Value) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
replaceVal := w.Callback(v.Interface().(string))
|
||||
replaceVal := w.Callback(v.String())
|
||||
|
||||
resultVal := reflect.ValueOf(replaceVal)
|
||||
switch w.loc {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user