From 1d5a4cef404e4e4137d2854dc9cab352280b3cfe Mon Sep 17 00:00:00 2001 From: Nikos Tsipinakis Date: Thu, 15 Feb 2024 18:26:27 +0100 Subject: [PATCH] Fix keyboardInteractive with audit-log --- .../handler_networkconnection.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/internal/auditlogintegration/handler_networkconnection.go b/internal/auditlogintegration/handler_networkconnection.go index 7ba05d6d..0e264313 100644 --- a/internal/auditlogintegration/handler_networkconnection.go +++ b/internal/auditlogintegration/handler_networkconnection.go @@ -2,13 +2,14 @@ package auditlogintegration import ( "context" + "fmt" - "go.containerssh.io/libcontainerssh/auditlog/message" - publicAuth "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/internal/auditlog" - internalAuth "go.containerssh.io/libcontainerssh/internal/auth" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/auditlog/message" + publicAuth "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/internal/auditlog" + internalAuth "go.containerssh.io/libcontainerssh/internal/auth" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/metadata" ) type networkConnectionHandler struct { @@ -44,8 +45,8 @@ func (n *networkConnectionHandler) OnAuthKeyboardInteractive( return answers, err } var auditAnswers []message.KeyboardInteractiveAnswer - for _, q := range auditQuestions { - a, err := answers.GetByQuestionText(q.Question) + for _, q := range questions { + a, err := answers.Get(q) if err != nil { return answers, err }