Skip to content

Commit

Permalink
Fix backwards compatiblity issue; fix error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joerger committed Oct 25, 2024
1 parent f301105 commit 7947990
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/srv/desktop/tdp/proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ func DecodeMFA(in byteReader) (*MFA, error) {
case defaults.MFAChallenge:
default:
return nil, trace.BadParameter(
"got mfa type %v, expected %v (WebAuthn)", mt, defaults.MFAChallenge)
"got mfa type %v, expected %v (MFAChallenge)", mt, defaults.MFAChallenge)
}

var length uint32
Expand Down Expand Up @@ -783,7 +783,7 @@ func DecodeMFAChallenge(in byteReader) (*MFA, error) {
case defaults.MFAChallenge:
default:
return nil, trace.BadParameter(
"got mfa type %v, expected %v (WebAuthn)", mt, defaults.MFAChallenge)
"got mfa type %v, expected %v (MFAChallenge)", mt, defaults.MFAChallenge)
}

var length uint32
Expand Down
2 changes: 1 addition & 1 deletion lib/web/mfa_codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (tdpMFACodec) Encode(chal *client.MFAAuthenticateChallenge, envelopeType st
case defaults.MFAChallenge:
default:
return nil, trace.BadParameter(
"received envelope type %v, expected %v (WebAuthn)", envelopeType, defaults.MFAChallenge)
"received envelope type %v, expected %v (MFAChallenge)", envelopeType, defaults.MFAChallenge)
}

tdpMsg := tdp.MFA{
Expand Down
2 changes: 1 addition & 1 deletion lib/web/mfajson/mfajson.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func Decode(b []byte, typ string) (*authproto.MFAAuthenticateResponse, error) {
case resp.CredentialAssertionResponse != nil:
return &authproto.MFAAuthenticateResponse{
Response: &authproto.MFAAuthenticateResponse_Webauthn{
Webauthn: wantypes.CredentialAssertionResponseToProto(resp.WebauthnResponse),
Webauthn: wantypes.CredentialAssertionResponseToProto(resp.CredentialAssertionResponse),
},
}, nil
case resp.WebauthnResponse != nil:
Expand Down

0 comments on commit 7947990

Please sign in to comment.