From 3dcae55dee115f1cd5d4c01e1ff3badbe3f8281d Mon Sep 17 00:00:00 2001 From: Yuli Date: Sun, 2 Feb 2020 20:50:52 +0200 Subject: [PATCH] fix bug --- src/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.go b/src/utils.go index 8cb6c70..9b435da 100644 --- a/src/utils.go +++ b/src/utils.go @@ -313,7 +313,7 @@ func (e mainEnv) enforceAuth(w http.ResponseWriter, r *http.Request, event *audi event.Identity = authResult.name } if authResult.ttype == "login" { - if authResult.token == event.Record { + if event != nil && authResult.token == event.Record { return authResult.ttype // else go down in code }