From 7206f99b849fe96c18f1d894aee8337cbc1ab44d Mon Sep 17 00:00:00 2001 From: Arsen Musayelyan Date: Sat, 27 Mar 2021 15:05:26 -0700 Subject: [PATCH] Fix login bypass bug --- routes.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/routes.go b/routes.go index efdea05..48230c3 100644 --- a/routes.go +++ b/routes.go @@ -38,6 +38,8 @@ func registerRoutes(app App) { if !ok && app.Config.LoginRequired { // Redirect to login page http.Redirect(res, req, "/login", http.StatusFound) + // Return from function + return } else if !ok && !app.Config.LoginRequired { // If not logged in and login is not required // Set logged in to public user