cerca

lean forum software (pmc local branch)
Log | Files | Refs | README | LICENSE

commit 690092e1c14f2639c9f6abf4e28ab1743f56b35c
parent d1ca774e693019f615947c28ce74a23ecf65917c
Author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
Date:   Thu, 13 Jan 2022 14:55:16 +0100

server: allow verification to fail on register if in development mode

Diffstat:
Mserver/server.go | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/server/server.go b/server/server.go @@ -337,8 +337,10 @@ func (h RequestHandler) RegisterRoute(res http.ResponseWriter, req *http.Request // parse out verification code from verification link and compare against verification code in session has := hasVerificationCode(verificationLink, verificationCode) if !has { - renderErr("Verification code from link (%s) does not match", verificationLink) - return + if !developing { + renderErr("Verification code from link (%s) does not match", verificationLink) + return + } } // make sure username is not registered already var exists bool