From 27e7ea7d7a0bbf6c147ff625591acf6376c6c62d Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 6 Jun 2023 22:28:58 -0400 Subject: [PATCH] fix: PostPubkeyLogin should not preload any model --- controller/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/auth.go b/controller/auth.go index c887712..0ae7e91 100644 --- a/controller/auth.go +++ b/controller/auth.go @@ -241,7 +241,7 @@ func (a *AuthController) PostPubkeyLogin() { // Retrieve the key challenge for the given challenge. challenge := model.KeyChallenge{} - if err := db.Get().Where("challenge = ?", r.Challenge).Preload("Key").First(&challenge).Error; err != nil { + if err := db.Get().Where("challenge = ?", r.Challenge).First(&challenge).Error; err != nil { msg := "invalid key challenge" logger.Get().Debug(msg, zap.Error(err), zap.String("challenge", r.Challenge)) a.Ctx.StopWithError(iris.StatusBadRequest, errorx.RejectedOperation.New(msg))