Skip to content

Commit f5f36e6

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

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
@@ -73,9 +73,9 @@ var (
7373
// possible that a Blob may gain an unwanted prefix of 0xff 0xfe.
7474
func jsonUnmarshalIgnoreErroneousBOM(bs []byte, v interface{}) error {
7575
json := jsoniter.ConfigCompatibleWithStandardLibrary
76-
err := json.Unmarshal(bs, &v)
76+
err := json.Unmarshal(bs, v)
7777
if err != nil && len(bs) > 2 && bs[0] == 0xff && bs[1] == 0xfe {
78-
err = json.Unmarshal(bs[2:], &v)
78+
err = json.Unmarshal(bs[2:], v)
7979
}
8080
return err
8181
}

0 commit comments

Comments
 (0)