mirror of
https://github.com/gmemstr/pogo.git
synced 2024-09-19 17:21:10 +01:00
Password to []byte
This commit is contained in:
parent
531aadef61
commit
b2ee790b32
2
setup.go
2
setup.go
|
@ -39,7 +39,7 @@ func Setup() {
|
|||
fmt.Print("Administrator password: ")
|
||||
text, err := reader.ReadString('\n')
|
||||
|
||||
hash, err := bcrypt.GenerateFromPassword(text, 8)
|
||||
hash, err := bcrypt.GenerateFromPassword([]byte(password), 8)
|
||||
|
||||
_, err = db.Exec("INSERT INTO users(id,username,hash,realname,email,permissions) VALUES (0,`admin`,?,`Administrator`,`admin@localhost`,2", hash)
|
||||
|
||||
|
|
Loading…
Reference in a new issue