From 4c0a266fb1df81dca682e79e3f8ed997bae466e3 Mon Sep 17 00:00:00 2001 From: MrMelon54 Date: Mon, 16 Oct 2023 18:21:42 +0100 Subject: [PATCH] Use form value for the digits parameter --- server/otp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/otp.go b/server/otp.go index 1d51203..d0a5515 100644 --- a/server/otp.go +++ b/server/otp.go @@ -77,7 +77,7 @@ func (h *HttpServer) fetchAndValidateOtp(rw http.ResponseWriter, sub uuid.UUID, func (h *HttpServer) EditOtpPost(rw http.ResponseWriter, req *http.Request, _ httprouter.Params, auth UserAuth) { var digits int - switch req.URL.Query().Get("digits") { + switch req.FormValue("digits") { case "6": digits = 6 case "7":