From 81959425a116695d2be7ab6210225ae507a9cc83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Z=C3=BCrcher?= Date: Mon, 16 Feb 2026 19:29:10 +0100 Subject: [PATCH] check error --- handlers/login.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/handlers/login.go b/handlers/login.go index de85270..0d6ae45 100644 --- a/handlers/login.go +++ b/handlers/login.go @@ -215,7 +215,13 @@ func (aH *AccessHandler) Me(c *gin.Context) { return } - claims := token.Claims.(jwt.MapClaims) + claims, ok := token.Claims.(jwt.MapClaims) + if !ok { + aH.logger.Error("Me", "error: token.Claims.(jwt.MapClaims)") + c.JSON(http.StatusInternalServerError, nil) + return + } + c.JSON(http.StatusOK, gin.H{ "id": claims["id"], "user": claims["username"],