File tree Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Original file line number Diff line number Diff line change @@ -390,13 +390,6 @@ func (u *DynamoUser) FinishLogin(r *http.Request) (*webauthn.Credential, error)
390
390
}
391
391
}
392
392
393
- // there is an issue with URLEncodeBase64.UnmarshalJSON and null values
394
- // see https://github.com/duo-labs/webauthn/issues/69
395
- // null byte sequence is []byte{158,233,101}
396
- if isNullByteSlice (parsedResponse .Response .UserHandle ) {
397
- parsedResponse .Response .UserHandle = nil
398
- }
399
-
400
393
credential , err := u .WebAuthnClient .ValidateLogin (u , u .SessionData , parsedResponse )
401
394
if err != nil {
402
395
logProtocolError ("failed to validate login" , err )
@@ -493,18 +486,6 @@ func (u *DynamoUser) WebAuthnCredentials() []webauthn.Credential {
493
486
})
494
487
}
495
488
496
- // isNullByteSlice works around a bug in JSON unmarshalling for a URL-encoded Base64 string
497
- // (see https://github.com/duo-labs/webauthn/issues/69)
498
- func isNullByteSlice (slice []byte ) bool {
499
- if len (slice ) != 3 {
500
- return false
501
- }
502
- if slice [0 ] == 158 && slice [1 ] == 233 && slice [2 ] == 101 {
503
- return true
504
- }
505
- return false
506
- }
507
-
508
489
// hashAndEncodeKeyHandle returns the Base64 URL-encoded SHA256 hash of a byte slice to provide a hash of a key
509
490
// handle to the client.
510
491
func hashAndEncodeKeyHandle (id []byte ) string {
You can’t perform that action at this time.
0 commit comments