Skip to content

Commit e5fde7e

Browse files
authored
Fix crash following ldap authentication update (#16447) (#16448)
Backport #16447 Unfortunately #16268 contained a terrible error, whereby there was a double indirection taken when unmarshalling the source data. This fatally breaks authentication configuration reading. Fix #16342 Signed-off-by: Andrew Thornton <[email protected]>
1 parent 6243638 commit e5fde7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

models/login_source.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ var (
7474
// possible that a Blob may gain an unwanted prefix of 0xff 0xfe.
7575
func jsonUnmarshalIgnoreErroneousBOM(bs []byte, v interface{}) error {
7676
json := jsoniter.ConfigCompatibleWithStandardLibrary
77-
err := json.Unmarshal(bs, &v)
77+
err := json.Unmarshal(bs, v)
7878
if err != nil && len(bs) > 2 && bs[0] == 0xff && bs[1] == 0xfe {
79-
err = json.Unmarshal(bs[2:], &v)
79+
err = json.Unmarshal(bs[2:], v)
8080
}
8181
return err
8282
}

0 commit comments

Comments
 (0)