fix(auth): alphanumeric passwords only, no special chars
This commit is contained in:
parent
19ae62da45
commit
461a9a7249
1 changed files with 1 additions and 1 deletions
|
|
@ -196,7 +196,7 @@ func containsGroup(groups, target string) bool {
|
|||
|
||||
// generatePassword creates a cryptographically secure random password.
|
||||
func generatePassword(length int) (string, error) {
|
||||
const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*-_"
|
||||
const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
||||
result := make([]byte, length)
|
||||
for i := range result {
|
||||
n, err := rand.Int(rand.Reader, big.NewInt(int64(len(charset))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue