aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/user/auth.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/user/auth.go')
-rw-r--r--routers/web/user/auth.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/routers/web/user/auth.go b/routers/web/user/auth.go
index b4c52675fd..9785ca68d5 100644
--- a/routers/web/user/auth.go
+++ b/routers/web/user/auth.go
@@ -9,7 +9,6 @@ import (
"errors"
"fmt"
"io"
- "io/ioutil"
"net/http"
"strings"
@@ -704,7 +703,7 @@ func updateAvatarIfNeed(url string, u *models.User) {
}
// ignore any error
if err == nil && resp.StatusCode == http.StatusOK {
- data, err := ioutil.ReadAll(io.LimitReader(resp.Body, setting.Avatar.MaxFileSize+1))
+ data, err := io.ReadAll(io.LimitReader(resp.Body, setting.Avatar.MaxFileSize+1))
if err == nil && int64(len(data)) <= setting.Avatar.MaxFileSize {
_ = u.UploadAvatar(data)
}