mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Fix random string generator (#384)
* Remove unused custom-alphabet feature of random string generator Fix random string generator Random string generator should return error if it fails to read random data via crypto/rand * Fixes variable (un)initialization mixed assign Update test GetRandomString
This commit is contained in:
committed by
Thomas Boerger
parent
952587dbae
commit
380e32e129
@@ -109,8 +109,12 @@ func CreateOrganization(org, owner *User) (err error) {
|
||||
}
|
||||
|
||||
org.LowerName = strings.ToLower(org.Name)
|
||||
org.Rands = GetUserSalt()
|
||||
org.Salt = GetUserSalt()
|
||||
if org.Rands, err = GetUserSalt(); err != nil {
|
||||
return err
|
||||
}
|
||||
if org.Salt, err = GetUserSalt(); err != nil {
|
||||
return err
|
||||
}
|
||||
org.UseCustomAvatar = true
|
||||
org.MaxRepoCreation = -1
|
||||
org.NumTeams = 1
|
||||
|
Reference in New Issue
Block a user