Truncate groups to 255 chargs max
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9807eeec1a
commit
24bd5a5e25
1 changed files with 3 additions and 0 deletions
3
auth.go
3
auth.go
|
@ -53,6 +53,9 @@ func completeAuth(w http.ResponseWriter, username string, email string, firstnam
|
|||
return err
|
||||
}
|
||||
|
||||
if len(groups) > 255 {
|
||||
groups = groups[:255]
|
||||
}
|
||||
if usr.Groups != groups {
|
||||
usr.Groups = groups
|
||||
usr.Update()
|
||||
|
|
Reference in a new issue