From 5672b6a520972c062d76baec96f8e2fb5fdc6bd8 Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Sun, 8 Jan 2023 15:48:58 +0530 Subject: [PATCH] generate password when reg script is run --- go.mod | 1 - pages/signup.go | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index d0f6602..67daea6 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,6 @@ require ( github.com/mattn/go-isatty v0.0.17 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/rivo/uniseg v0.2.0 // indirect - github.com/sethvargo/go-password v0.2.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasthttp v1.43.0 // indirect diff --git a/pages/signup.go b/pages/signup.go index 6dec72c..0d9633c 100644 --- a/pages/signup.go +++ b/pages/signup.go @@ -6,8 +6,6 @@ import ( "github.com/gofiber/fiber/v2" - "github.com/sethvargo/go-password/password" - "github.com/containrrr/shoutrrr" log "github.com/sirupsen/logrus" @@ -41,8 +39,9 @@ func SignupPage(c *fiber.Ctx) error { bashscript := "#!/bin/bash \n" + "# Path: /var/publapi/users/" + username + ".sh\n" + "# This file is generated by publapi. Do not edit this file.\n" + + "pass=\"$(tr -dc A-Za-z0-9