forked from ProjectSegfault/publapi
remove password gen lib completely
Signed-off-by: Odyssey <odyssey346@disroot.org>
This commit is contained in:
parent
44b5af735c
commit
4321c7230b
@ -21,13 +21,6 @@ func SignupPage(c *fiber.Ctx) error {
|
||||
return c.SendStatus(fiber.StatusBadRequest)
|
||||
}
|
||||
|
||||
// generate password
|
||||
pass, err := password.Generate(30, 10, 10, false, false)
|
||||
if err != nil {
|
||||
log.Error("Error generating password", err)
|
||||
return c.SendStatus(fiber.StatusInternalServerError)
|
||||
}
|
||||
|
||||
// create user file
|
||||
f, err := os.Create("/var/publapi/users/" + username + ".sh")
|
||||
if err != nil {
|
||||
@ -47,7 +40,6 @@ func SignupPage(c *fiber.Ctx) error {
|
||||
"chown " + username + ":" + username + " /home/" + username + "/pass\n" +
|
||||
"echo \"" + username + "'s account has been created!\""
|
||||
|
||||
|
||||
// write to file
|
||||
_, err = f.WriteString(bashscript)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user