Fix login bypass bug
This commit is contained in:
parent
3895fe2d08
commit
7206f99b84
@ -38,6 +38,8 @@ func registerRoutes(app App) {
|
|||||||
if !ok && app.Config.LoginRequired {
|
if !ok && app.Config.LoginRequired {
|
||||||
// Redirect to login page
|
// Redirect to login page
|
||||||
http.Redirect(res, req, "/login", http.StatusFound)
|
http.Redirect(res, req, "/login", http.StatusFound)
|
||||||
|
// Return from function
|
||||||
|
return
|
||||||
} else if !ok && !app.Config.LoginRequired {
|
} else if !ok && !app.Config.LoginRequired {
|
||||||
// If not logged in and login is not required
|
// If not logged in and login is not required
|
||||||
// Set logged in to public user
|
// Set logged in to public user
|
||||||
|
Reference in New Issue
Block a user