commit 1b1fbdeda65ed3744acca2ce1e33015d4e8653b6
parent d54db6be75abcb7160ae61781956b0337bfe3d54
Author: Alexander Cobleigh <cblgh@cblgh.org>
Date: Thu, 13 Jan 2022 15:39:10 +0100
Merge pull request #19 from ftrvxmtrx/development-no-verification
server: allow verification to fail on register if in development mode
Diffstat:
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