Skip to content

Commit fdb0e82

Browse files
Fix crash following ldap authentication update (#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]> Co-authored-by: techknowlogick <[email protected]>
1 parent e417cca commit fdb0e82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

models/login_source.go

Lines changed: 2 additions & 2 deletions
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)