Use form value for the digits parameter

This commit is contained in:
Melon 2023-10-16 18:21:42 +01:00
parent 4bc46c5874
commit 4c0a266fb1
Signed by: melon
GPG Key ID: 6C9D970C50D26A25

View File

@ -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) { func (h *HttpServer) EditOtpPost(rw http.ResponseWriter, req *http.Request, _ httprouter.Params, auth UserAuth) {
var digits int var digits int
switch req.URL.Query().Get("digits") { switch req.FormValue("digits") {
case "6": case "6":
digits = 6 digits = 6
case "7": case "7":