commit 68902fc0c45e7cf05e07f13a41b40a2c1d4a0563
parent cdd4420ad33db43357927a17a329a6d02692d870
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Sat, 3 Dec 2022 17:32:57 -0500
add some notes
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go
@@ -1072,6 +1072,7 @@ func ForgotPasswordHandler(c echo.Context) error {
formName := c.Request().PostFormValue("form_name")
if formName == "step1" {
+ // Receive and validate Username/Captcha
data.Step = 1
data.Username = c.Request().PostFormValue("username")
captchaID := c.Request().PostFormValue("captcha_id")
@@ -1119,6 +1120,7 @@ func ForgotPasswordHandler(c echo.Context) error {
return c.Render(http.StatusOK, "forgot-password", data)
} else if formName == "step2" {
+ // Receive and validate GPG code/signature
data.Step = 2
partialRecoveryCookie, err := c.Cookie("partial-recovery-token")
if err != nil {
@@ -1164,6 +1166,7 @@ func ForgotPasswordHandler(c echo.Context) error {
return c.Render(http.StatusOK, "forgot-password", data)
} else if formName == "step3" {
+ // Receive and validate new password
data.Step = 3
partialRecovery2Cookie, err := c.Cookie("partial-recovery2-token")