Front-End Stuff
This commit is contained in:
parent
b278b42b01
commit
7e9e301bfb
1 changed files with 4 additions and 4 deletions
8
utils.go
8
utils.go
|
@ -7,8 +7,8 @@ import (
|
||||||
"github.com/go-ldap/ldap/v3"
|
"github.com/go-ldap/ldap/v3"
|
||||||
// "bytes"
|
// "bytes"
|
||||||
// "crypto/rand"
|
// "crypto/rand"
|
||||||
// "encoding/binary"
|
"encoding/binary"
|
||||||
"encoding/hex"
|
// "encoding/hex"
|
||||||
// "fmt"
|
// "fmt"
|
||||||
// "html/template"
|
// "html/template"
|
||||||
// "log"
|
// "log"
|
||||||
|
@ -43,9 +43,9 @@ func openLdap(config ConfigFile) *ldap.Conn {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func suggestPassword() string {
|
func suggestPassword() uint32 {
|
||||||
random := make([]byte, 32)
|
random := make([]byte, 32)
|
||||||
return hex.EncodeToString(random[0:4])
|
return binary.BigEndian.Uint32(random[0:12])
|
||||||
}
|
}
|
||||||
|
|
||||||
func addNewUser(newUser NewUser, config *ConfigFile, login *LoginStatus) bool {
|
func addNewUser(newUser NewUser, config *ConfigFile, login *LoginStatus) bool {
|
||||||
|
|
Loading…
Reference in a new issue