Commit 1d3223b1 authored by Eric's avatar Eric

[Update] cancel confirm when user exit.

parent e69d14c5
...@@ -106,6 +106,10 @@ func CheckMFA(ctx ssh.Context, challenger gossh.KeyboardInteractiveChallenge) (r ...@@ -106,6 +106,10 @@ func CheckMFA(ctx ssh.Context, challenger gossh.KeyboardInteractiveChallenge) (r
} }
answers, err := challenger(username, instruction, []string{question}, []bool{true}) answers, err := challenger(username, instruction, []string{question}, []bool{true})
if err != nil || len(answers) != 1 { if err != nil || len(answers) != 1 {
if confirmAction {
client.CancelConfirm()
}
logger.Errorf("User %s happened err: %s", username, err)
return return
} }
if confirmAction { if confirmAction {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment